操作方法
第一,启动MATLAB,在命令行窗口(Command Window)输入simulink然后回车。
第二,此时弹出Simulink Library Browser,然后点击File->New->Model.
第三,此时弹出建模区(默认名称为untitled)。
第四,在第二步的Simulink Library Browser中找到Source Library,并将Sine Wave和Constant模块拖到建模区,再找到Math Operations Library,并将Sum模块拖到建模区,再找到Sinks Library,并将Scope模块拖到建模区。如下图。
第五,将鼠标移动到各个模块上,并将输出与输入端连接起来。如下图。
第六,点击工具栏中的Simulation->Model Configuration Parameters,将Solver中的ode45(Dormand-Prince)设置为discrete(no continuous states)。
第七,再将Diagnostics中的Automatic solver parameter selection设置为none.
第八,然后点击File->Save保存该模型(untitled.slx),再点击Simulation->Run运行该模型。保存和运行应该都没有问题,最后点击Scope,并点击Scope工具栏中的Autoscale,得到如下正弦函数sin(x)+1的图形。