⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sos3.m

📁 华东理工大学自动化系《控制系统分析、设计和应用》教材配套程序实例,有关说明: 1. 安装MATLAB软件。安装时
💻 M
字号:
figure('pos',[100,100,300,200],'color','w');
axes('pos',[.1,.1,.8,.8]);
t=[0,6:2:20];
h=[0,.8632 .9452 .9787 .9919 .9969 ];
load oscdata;st=osc;t=st(1,:);h=st(2,:);tm=max(t);
%t=y(1,[1:10:200,200:100:tm]);h=y(2,[1:10:200,200:100:tm]);
%tt=t;hh=h;
tt=0:0.1:tm;hh=spline(t,h,tt);
x0=[2,15,3];
opti=optimset('fminbnd');val=optimset(opti,'MaxFunEvals',3000);
x=lsqcurvefit('osc1',x0,tt,hh,0,100,val)
y=osc1(x,tt);err=sum((hh-y).^2)
save fitdata1 t h tt y x;
plot(t,h,'b*',tt,y,'k');grid;%pause;
%plot(tt,hh-y);grid;maxerr=max(abs(hh-y));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -