📄 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 + -