You are here

Solution to Exercise 7.3

12 October, 2015 - 10:07

Data can be entered as follows:

    velocity=[12 142 512 1122 1972];
time=[0 5 10 15 20];

we can now plot the data by typing in

plot(time,velocity);title('Velocity-Time Graph');xlabel('time');ylabel('velocity');

at the MATLAB prompt. The following plot is generated, select Tools > Basic Fitting, notice that we are choosing the quadratic option this time:

media/image10.png

As shown above, the relationship between velocity and time is:

y = 4.8x^2+2x+12