Question
Data.mat is generated from MATLAB Mobile. This represents accelerometer data (in m/s^2) along the x, y and z axes. A mobile phone was lightly tossed
Data.mat is generated from MATLAB Mobile. This represents accelerometer data (in m/s^2) along the x, y and z axes. A mobile phone was lightly tossed upwards and I caught it just in time. The sample rate is 50 Hz. You can generate your own similar data if you wish.
Use only the z axis data for this analysis.
Create a MATLAB live script that will perform the following analysis tasks on the data:
(a) Plot the original data using a black solid line, and plot your fitted polynomial functions using a red dashed line. Your plot should contain a slider that allows the user to experiment with different polynomial degrees.
Use clear labels, legends and clear textual explanation for each graph.
(b) On a second plot, plot the same original data with black lines, and use green line(s) to show moving average smoothing. Your plot should contain a slider that allows the user to experiment with different window sizes.
(c) Determined the sum of squared errors and R2 for each of the above curve fits. These calculations should be performed using functions and vectorisation (where possible). The results should be tabulated in a clear output table.
Do not drop your phone, please do these experiments on top of a soft surface (eg. A mattress) if you want to try.
Attachments:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started