running a model repetitively from a m-file using sim() command
조회 수: 1 (최근 30일)
이전 댓글 표시
im trying to run a simulink model of pi controller through a m-file in a repetitive way.in each iteration a value of the pi parameter will be set,and the corresponding output will aslo be tabulated.in the next iteration the pi parameter will also be changed by a new values.how this can be done?
댓글 수: 3
채택된 답변
TAB
2012년 1월 27일
I am not clear what exactly you want to do.
You can stop the simulation from m-file, change your parameter (pi) and start the simulation again.
To start the simulation, use
set_param(gcs,'SimulationCommand','start');
To pause the simulation, use
set_param(gcs,'SimulationCommand','pause');
To resume the simulation, use
set_param(gcs,'SimulationCommand','continue');
and To stop the simulation, use
set_param(gcs,'SimulationCommand','stop');
댓글 수: 5
추가 답변 (0개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!