Data Visualization

(1) Using figure and plot command, plot sensor data (acc_measured) as a red start (e.g., plot(x,y,’r*’) and real theory value (acc_real) as a line. You must show both on the same plot to compare it. Title your figure and legend properly assuming that you are copying this plot into your engineering report.

(2) Using polyfit command, find the best 4th order polynomial equation for the noisy sensor data.

Hint: >> p=polyfit(t,acc_measured, 4)

(3) Plot sensor data, real value and the fitted 4th order polynomial equation on the same plot, using polyval(p,t) command.