How do I run an "example.m" file in Simulink?

My MATLAB code is written in example.m. Now, how do I run this example.m file in Simulink?

回答(1 个)

Jonas
Jonas 2021-2-5
编辑:Jonas 2021-2-5
In the MATLAB workspace type and enter:
>> example
Or, go to the editor and click the green play button 'Run'.
Or press the 'F5' button when inside the editor.
Or in the MATLAB file explorer, right click the file and select 'Run'.
Or in the MATLAB file explorer, right click the file and press 'F9'.

2 个评论

I want to run/call (example.m ) file in simulink project/file.
Use the MATLAB function block and copy your code inside of it.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Modeling 的更多信息

产品

提问:

ak
2021-2-4

编辑:

2021-2-9

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by