MATLAB POLYSPACE RELEASE NOTES User Manual Page 191

  • Download
  • Add to my manuals
  • Print
  • Page
    / 240
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 190
Modeling Data
X = [ones(size(tdata)) cos((2* pi/12)*(tdata-7))];
s_coeffs = X\c3;
figure
plot(c3,'o-')
hold on
tfit = (1:0.01:24)';
yfit = [ones(size(tfit)) cos((2*pi/12)*(t fit- 7))]*s_coeffs;
plot(tfit,yfit,'r-','LineWidth',2)
legend('Data','Sinusoidal Fit','Location', 'NW' )
Use the MATLAB lscov function to compute statistics on the fit, such as
estimated standard e rrors of the coefficients and the mean squared error:
[s_coeffs,stdx,mse] = lscov(X,c3)
s_coeffs =
65.5833
5-21
Page view 190
1 2 ... 186 187 188 189 190 191 192 193 194 195 196 ... 239 240

Comments to this Manuals

No comments