start simulation of simulink with mfile~~

i m trying to start the matlab panorama demo with command line. using this command
set_param(Panorama,'start')
sim(Panorama,inf)
but the video viewer and the panorama GUI is pop out~~~ but it don't run the result~~ Anyone here can help ~~~ thx ~~

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2012년 3월 12일

0 개 추천

Is Panorama a string variable containing the name of the model? Also, not sure where you got this command from: set_param(Panorama,'start'), the command to start a simulation is: set_param('modelname','SimulationCommand', 'start'). You need to use set_param('modelname','SimulationCommand', 'stop') to stop the simulation.
However, you can use the sim command to start and stop simulation automatically. You don't need to use the 'Start' and 'Stop' commands if you are using this.
Do you see any error in the MATLAB command window when you follow these directions?

댓글 수: 4

Chong Keat
Chong Keat 2012년 3월 12일
to open the demo of panorama through command line, i already create it in a new simulink in Panorama.mdl
with ur suggestion, i try to type the command in below
set_param(Panorama,'SimulationCommand','start')
but got error to tell me restart the matlab~~
wat should i put in for simulation command?
thx ~~
Kaustubha Govind
Kaustubha Govind 2012년 3월 13일
As I mentioned, you need to enter the model name as a string:
set_param('Panorama', 'SimulationCommand', 'start')
Note the single quotes around the model name.
Chong Keat
Chong Keat 2012년 3월 14일
thankyou very much ~~
but after i string the Panorama
the program didn't run and pop up the error below~~
??? Error using ==> fpanorama at 2
Invalid Simulink object name: Panorama.
thanks again
Kaustubha Govind
Kaustubha Govind 2012년 3월 14일
The model needs to be open.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기

태그

질문:

2012년 3월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by