Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need help with this lab I have to do. I never was taught matlab so I really have

ID: 3564347 • Letter: N

Question

Need help with this lab I have to do. I never was taught matlab so I really have no clue how to do this. Apparently it's supposed to be easy though. Here's the prompt:

This week you will use MATLAB to graph the forces on a Wiimote after it fell from the third
story of Coover. You have been provided two CSV files containing data from the drop. There are
four columns and contain the time in milliseconds as well as the force in the x, y, and z
directions in g-units.
Import the data into MATLAB using comma delimited formatting and label the columns
according to the data they hold. You will need to take the x, y, and z data and turn it into a
single column by creating a new column called mag and fill it with the magnitude of the three
dimensions using the following command:
mag = sqrt(x.^2+y.^2+z.^2);
The dots the in the expression are necessary to do the operation on every element inside of the
columns. You will then graph time against this new data in order to see the forces on the
Wiimote over time using this command:
plot(t, mag);
Print out this graph and then label it with the following events: the Wiimote is waiting,
dropped, falling, first impact, and second impact. Additionally, using the formula ??? =1/2????^2
where ?y is the distance fallen, g is the acceleration due to gravity (9.8 m/s2
), and t is the
amount of time that the object was falling, calculate the height from which the Wiimote was
dropped. Finally, repeat these steps for the second CSV file.

And here are the drop files that we get the data from:

http://www.filedropper.com/drop1_1

http://www.filedropper.com/drop2

I don't need like an actual matlab file, just the steps as to how to do what is asked. Thanks

Explanation / Answer

There is a function in matlab called

csvread('filename.csv')

It takes input the comma separated file and outputs the 4 x n matrix as per your requirement.

Now use this line in your code:

1) Matrix=csvread('filename.csv');

2) t=Matrix(:,1); x=Matrix(:,2); y=Matrix(:,3); z=Matrix(:,4);

3) mag=sqrt(x.^2+y.^2+z.^2);

4) plot(t,mag); % This line plots r versus t.

The next part of the question not clear. So if you explain that properly, I can even give you the code

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote