?? command_in_out_m2.m
字號:
t=0:0.1:10; t=t'; u=sin(t); sim_input=[t, u];
[tout1, x1, yout1]=sim('command_in_out', 10); % 使用 Simulink 仿真參數對話框中的 workspace I/O 從 MATLAB 工作空間中獲得輸入信號
u=cos(t);
ut=[t, u]; % 改變系統輸入信號
[tout2, x2, yout2]=sim('command_in_out', 10, [], ut); % 使用 Sim 中的 ut 參數獲得系統輸入信號, ut的使用會覆蓋由 Workspace I/O 的系統輸入設置>,這一點可以在下面的系統仿真結果圖形中反映出來
subplot(2, 1, 1); plot(tout1, yout1); grid
subplot(2, 1, 2); plot(tout2, yout2); grid
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -