?? simu.m
字號:
%仿真子程序
%仿真(Hoo控制器)
closedlp;
[pa,pb,pc,pd]=unpck(Psys);
[ka,kb,kc,kd]=unpck(K);
[da,db,dc,dd]=unpck(sel(Clsys,1,1));
[ua,ub,uc,ud]=unpck(sel(Clsys,2,1));
%干擾響應
t=[0:0.0001:0.1]; %X加分號
[y,x,t]=step(da,db,dc,dd,1,t);
[u,x,t]=step(ua,ub,uc,ud,1,t);
figure(3)
subplot(2,1,1)
plot(t,y)
axis([0 0.1 0 16])
xlabel('Time[s]')
ylabel('Amplitude')
title('Step disturbance response')
grid on;
%控制輸入
subplot(2,1,2)
figure(4)
plot(t,u)
axis([0 0.01 -1.7 0]) %X此處有所改動,加方括號
xlabel('Time[s]')
ylabel('u[V]')
title('input')
grid on
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -