`Hey,
Note: If you have any queries related the answer please
do comment. I would be very happy to resolve all your
queries.
clc%clears screen
clear all%clears history
close all%closes all files
format long
t=[0.4,0.8,1.2,1.6,2,2.3];
c=[750,1000,1400,2000,2700,3750];
hold on;
plot(t,c,'o');
for i=2:5
C=polyfit(t,c,i);
x=0:0.1:2.7;
y=polyval(C,x);
plot(x,y,'--');
end
xlabel('time');
ylabel('Concentration');
title('Polynomial curve fits');
legend('observation','second order','third order','fourth
order','fifth order','Location','NorthWest');
Kindly revert for any queries
Thanks.
- 5 x Pradeep - 0 X 56 Search Documentation View Insert Tools EDITOR Figure 1 Insert E. fx Eile Edit Comment % 99 O Indent 1 1 EDIT 8000 Desktop Window A B Help D E - Polynomial curve fits I a 7000 X O observation - - - second order ---third order - --fourth order - - - fifth order egg2.m x testc. mxahk. mx nse_filt. mx + 6000 A MATLAB R2018 HOME PLOTS APPS D E L Find Files 3 Compare - -Go To - New Save Open Print F ind FILE NAVIGATE hal Windows System32 Current Folder Name 0409 1029 1033 1036 1040 1045 1046 1049 1055 3082 Advancedinstallers af-ZA am-et AppLocker appraiser Details 5000 4000 EE EcoJOWN Concentration 3000 2000 -1000 0 0.5 1 1.5 2 2.5 3 Workspace fifth order', 'Location', 'NorthWest'); S time Name Value [750, 1000, 1400,2000,2... [917.6365, -5.7500e+0... Command Window fx >> H2-23 [0.4000,0.8000, 1.2000,... 1x28 double 1x28 double script Ln 18 Col 104 ENG 12:39 PM IN 04/05/20 Type here to search