Filter löschen
Filter löschen

Matlab Interfaces. Access Simulation time.

3 Ansichten (letzte 30 Tage)
Sindia Casado
Sindia Casado am 4 Sep. 2012
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

Akzeptierte Antwort

Sindia Casado
Sindia Casado am 5 Sep. 2012
Thank you so much for your help!
  1 Kommentar
TAB
TAB am 5 Sep. 2012
Bearbeitet: TAB am 5 Sep. 2012
@Sindia: Please accept the answer if it helped.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

TAB
TAB am 4 Sep. 2012
Bearbeitet: TAB am 4 Sep. 2012
% 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');

Kategorien

Mehr zu Model, Block, and Port Callbacks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by