start simulink from matlab access scopes

When you start a simulink simulatioon using the "sim" command, you cannot access the scopes when the simulation execution ends.
Is there a way or a command to let me study the scopes, as I do when starting a simulation directly in simulink environment ?
EDIT: I've to clearify my question! It's only then not possibly to access the scopes (you can doubleclick, but the scope is black) when I start a siumulation from MATLAB (sim command) and the accelerator type is " rapid accelerator "
Is there a way to see the scope results, other than watching it in MATLAB by plot() the variables in workspace?

 Respuesta aceptada

A Jenkins
A Jenkins el 30 de Ag. de 2013
If you want to access your scopes graphically through the Simulink interface:
sim('modelname')
open('modelname')
If you want the data programatically, then use the scope to "Save Data to Workspace" and you can manipulate it from there. For example:
simplot(ScopeData)

3 comentarios

A Jenkins
A Jenkins el 5 de Sept. de 2013
In reference to your EDIT, the scope window is not updated when running in rapid accelerator mode from the command line. See the official explanation here:
Is there a reason you don't like plotting from your workspace? Or that you need to run in rapid accelerator mode using sim() instead of from the menu?
Leif
Leif el 6 de Sept. de 2013
It's just easier to watch the scopes directly.
I need the command line for additional investigation (e.g. tic toc command).
Are the scopes updated in 'accelerator' mode ?
A Jenkins
A Jenkins el 6 de Sept. de 2013
Yes, you should be able to watch the scopes directly in accelerator mode.
Newer versions also include something called Simulink Data Inspector. I haven't used it, but it may be helpful for you if you have the time to learn it: http://www.mathworks.com/help/simulink/ug/record-and-inspect-signal-data-programmatically.html

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Etiquetas

Preguntada:

el 30 de Ag. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by