How to call a file.m

1 回表示 (過去 30 日間)
saeede
saeede 2023 年 12 月 25 日
回答済み: madhan ravi 2024 年 1 月 4 日
I need your help.
I am working on a simulink model and I want whenever run it, I give it some inputs. e.g. I can give it different heights when I want it to work.
I defined a file.m in the same directory and same name. but whenever I run it I face this error:
What should I do?

回答 (1 件)

madhan ravi
madhan ravi 2024 年 1 月 4 日
Let’s say your file name is Load_Variables.m.
And it has a code:
Vax = 10;
Click the run button in MATLAB , now this variable Vax is loaded into workspace.
Then run the Simulink .slx file. To see if the variable exists in base workspace. Type
whos
In command window.

カテゴリ

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