% x=[24 44 65 76 112 128 152 168 180 196 216 240 260 292 324 360 384 412 428 460 496 524 580 628 680]';
%
% y=[0.92 3.08 5.00 6.64 8.20 7.76 6.56 5.56 4.88 4.32 4.00 4.32 4.88 5.76 6.12 5.80 5.44 5.12 5.04 5.12 5.40 5.56 5.44 5.32 5.28]';
% syms t
% %f=fittype('s*k*w*t','independent','t','coefficients',{'s','k','w'});
% f=fittype('5-5*exp(-s*wn*t)/sqrt(1-s^2)*sin(wn*sqrt(1-s^2)*t+b)','independent','t','coefficients',{'s','wn','b'});
% %f=fittype('a*k*w*t','independent','t','coefficients',{'a','k','w'});
% options = fitoptions(f);
% options.StartPoint=[0.2 31 1];
% options.Lower = [-999 -999 0];
% options.Upper=[100 999 1];
% cfun=fit(x,y,f) %顯示擬合函數,數據必須爲列向量形式
%
% xi=0:1:680;
%
% yi=cfun(xi);
%
% figure
%
% plot(x,y,'r*',xi,yi,'b-');
%
% title('擬合函數圖形');函數