How do I plot Simulink signal values saved to the MATLAB workspace on an axes?
635 views (last 30 days)
Arnaud Miege on 31 May 2011
I assume you run the Simulink model from the MATLAB GUI using the sim command. The data from your Scope will end up in the GUI (caller) workspace rather than the base workspace. So you should be able to plot it using something like:
You may need to specify the handle of the axis on which to plot the data.
Also have a look at this technical solution.
More Answers (5)
Walter Roberson on 31 May 2011
Are you using a "To Workspace" block? If so then when you look at the variable, what class() and size() is it? And what kind of plot are you thinking of?
Nuno Agualusa on 28 Jan 2012
I'm facing the same problem, but with a small diference. I'm running the simulink from GUI, but when the simulation finish doesn't apear a variable 'simout' in my base workspace. So i can´t plot the result on axes. I'm using a variable block in simulink, to get all the data to worspace. The only way that i found to get a variable in base workspace, is to run the simulation manualy in simulink.
what can i do to solve this situation?
Thank you very much.
yati j on 9 Oct 2016
Edited: Walter Roberson on 9 Oct 2016
Hello, Could u suggest me any tutorial or any solution to this
- i have my motor dc to run
- when the dc motor run/rotate, maybe a graph pop-up which is read my motor speed or relevant to the rotation
- i dont know the connection btween component
- i dont know how to draw the simulink
i've read and watched a lot of tutorial.