フィルターのクリア

Matlab Interfaces. Access Simulation time.

3 ビュー (過去 30 日間)
Sindia Casado
Sindia Casado 2012 年 9 月 4 日
Hello all,
I am working with Matlab for long. Now i am starting to work with GUIDE in order to do different programs to have different interfaces in Matlab. One question that I cannot solve is the following one. How can I access the Simulation time (Start and Stop time) through the interface? What i want to do is introduce (in a screen that I previously do in Matlab) the Start Time and the Stop time, and then click on a button (For example continue Button) and then the model starts simulating. Is there any command or programming that permit accessing the simulation time by interface?
Thank you so much in advanced Sindia

採用された回答

Sindia Casado
Sindia Casado 2012 年 9 月 5 日
Thank you so much for your help!
  1 件のコメント
TAB
TAB 2012 年 9 月 5 日
編集済み: TAB 2012 年 9 月 5 日
@Sindia: Please accept the answer if it helped.

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

その他の回答 (1 件)

TAB
TAB 2012 年 9 月 4 日
編集済み: TAB 2012 年 9 月 4 日
% To read values from the model
MdlStartTime = get_param('YourModelName','StartTime');
MdlStopTime = get_param(YourModelName,'StopTime');
% To change values in the model
set_param(YourModelName,'StartTime','NewValue');
set_param(YourModelName,'StopTime','NewValue');

カテゴリ

Help Center および File ExchangeModel, Block, and Port Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by