フィルターのクリア

How to run a simulink model using a program? what is the command used?

4 ビュー (過去 30 日間)
Susmita
Susmita 2012 年 2 月 18 日
編集済み: Azzi Abdelmalek 2013 年 10 月 16 日
Sim command is generally used....I am confused how it is used....how the values produced from the program are transfered to the simulink model.

採用された回答

TAB
TAB 2012 年 2 月 18 日
sim('YourModel');
OR
set_param('YourModel', 'SimulationCommand', 'start');
Using set_param('YourModel', 'SimulationCommand', ...) you can start, stop, pause or continue the simulation.
  3 件のコメント
TAB
TAB 2012 年 2 月 20 日
"where a = arr(1,1); arr() is an arg of the function"
Didn't understand - arr() is an arg of the function.
for "set_param('newmodel/PID','KP','a')" a should be present on base workspace.
Kaustubha Govind
Kaustubha Govind 2012 年 2 月 20 日
You need to set the SrcWorkspace parameter as described here: http://www.mathworks.com/matlabcentral/answers/10149-simulink-workspace
By default, Simulink looks for the parameter variables in the base workspace. Setting SrcWorkspace to 'current' forces it to use the current (function) workspace instead.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by