Question
USING MATLAB.

For given data, estimate the length when time is at 3.5 seconds and at 13 seconds by utilizing the maximum number of data giv
0 0
Add a comment Improve this question Transcribed image text
Answer #1

clear all;
clc;
close all;
t=[1:8 10 15];
L=[10,17,18,25,28,30,30,33,36,38];
disp('Data by part a');
C=polyfit(t,L,1);
disp('Length at 3.5 is');
polyval(C,3.5)
disp('Length at 13 is');
polyval(C,13)
xx=1:0.1:15;
figure;
plot(xx,polyval(C,xx),t,L,'o');
title('Part a');
disp('Data by part b');
C=polyfit(t,log(L),1);
a=exp(C(2));
b=C(1);
f=@(x) a*exp(b*x);
disp('Length at 3.5 is');
f(3.5)
disp('Length at 13 is');
f(13)
xx=1:0.1:15;
figure;
plot(xx,f(xx),t,L,'o');
title('Part b');

Add a comment
Know the answer?
Add Answer to:
USING MATLAB. For given data, estimate the length when time is at 3.5 seconds and at...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT