) The Mystical River’s water flow rate on a particular day is shown in the table below. The time is measured in hours and the water flow rate is measured in cubic feet per second
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:14| Question number:20.14
All Answers
total answers (1)
Ch14Ex20.m
% Plot the water flow rate for the Mystical River one day
% Fit polynomials of order 3 and 4 through the points and plot
time = 0:3:24;
flows = [800 980 1090 1520 1920 1670 1440 1380 1300];
subplot(1,2,1)
curve = polyfit(time,flows,3);
y3 = polyval(curve,time);
plot(time,flows,'ko',time,y3)
xlabel('Time')
ylabel('Flow rate')
title('Order 3 polynomial')
subplot(1,2,2)
curve = polyfit(time,flows,4);
y4 = polyval(curve,time);
plot(time,flows,'ko',time,y4)
xlabel('Time')
ylabel('Flow rate')
title('Order 4 polynomial')
need an explanation for this answer? contact us directly to get an explanation for this answer