フィルターのクリア

.m file variable to simulink model

1 回表示 (過去 30 日間)
RoboKid
RoboKid 2013 年 11 月 14 日
編集済み: RoboKid 2015 年 5 月 17 日
How can I use a variable used in .m file into the simulink model?

採用された回答

Danilo NASCIMENTO
Danilo NASCIMENTO 2013 年 11 月 14 日
You can use a block called "from workspace" in simulink source library.
  2 件のコメント
RoboKid
RoboKid 2013 年 11 月 14 日
Why I'm not able use one column data, for 'From workspace' block it says I need two dimensions and at least two columns.
Michael Herold
Michael Herold 2014 年 9 月 25 日
Hi,
i'm not sure if you still have this problem, but when you use a 'From workspace' block you need a signal vector and a time vector. Otherwise the simulation would not know to which time a certain signal value belongs.
If you just have a constant signal over time, you can just put the name of your variable in workspace as value of the constant in the block. It's works also for gains and parameters of masked subsystems (like amplitude of sinus source block)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSchedule Model Components についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by