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

6 ビュー (過去 30 日間)
ak
ak 2021 年 2 月 4 日
編集済み: Jonas 2021 年 2 月 9 日
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 件のコメント
ak
ak 2021 年 2 月 9 日
I want to run/call (example.m ) file in simulink project/file.
Jonas
Jonas 2021 年 2 月 9 日
編集済み: Jonas 2021 年 2 月 9 日
Use the MATLAB function block and copy your code inside of it.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by