transfer simulink model to .m file

Started by Hany Ferdinando December 2, 2000
dear all,

I have a problem in making my .m file access simulink model. I have a
model and I need some parameter read from that model after finishing the
simulation. I have tried to use get_param() to monitor its status. The
objectives is when the status is 'stop', I will continue to the next

here is my script:

statussl = get_param('sys','SimulationStatus')
while (statussl == 'running')
statussl = get_param('sys','SimulationStatus')

My simulation start after matlab executing set_param, but when matlab read
the status, the simulation is halt, and my script was idle in the while

My question:
1. Can matlab do this job simulantenously?
2. What should I do if I want to make it happen?
3. I have an idea to transfer my simulink model to .m file but I donot
know how to do it. Does anyone have idea?

thansk a lot Hany Ferdinando
Petra Christian University
Department of Electrical Engineering
Siwalankerto 121-131, Surabaya 60236, Indonesia
phone : 62-31-8439040

If you want to look at simulation results only after the simulation runs, you
can use the "sim" command. It starts the simulation, executes it, and returns
only after the simulation ends.

If however, you want to continuously monitor a simulation, perhaps to implement
some ending criteria, I don't know what you can do.

Glen Ragan