How do I display simulation results on Figure

Illustration
shalura_singh - 2021-10-07T12:40:30+00:00
Question: How do I display simulation results on Figure

How do I display simulation results on Figure still in R2013b and later, just like in previous versions of the simplot command? I get simulation results in the Base workspace from  Simulink model using "To Workspace block", create  Figure with simplot command.   When I do this procedures in R2013b or later version,  I see the simulation result are displayed on Data Inspector.    I would like to know how do I get the same results in R2013b, as before R2013a.  

Expert Answer

Profile picture of John Williams John Williams answered . 2025-11-20

In R2013b and later versions, simplot has changed to the specification that simplot launches the Simulation Data Inspector.
 
(Reference) Inspection of signal data by
 
?Simulation data inspector
 
In addition, simplot is not recommented now. Please use "Simulink.sdi.view" instead of simplot.
 
Add for R2015a and later versions, you can switch Scope to Time Scope (switch select the icon on the far right of the Scope screen). 
 
Time Scope has the capability to export scope screens directly to Figure, albeit manually.
 
 
If you would to display the results on Figure, please use the plot command instead.
 
Following is an example that draws time structure data exported from "To Workspace" block. 
 
% simplot(simout) alternative command: simout is 1x1 timed structure data 
f = figure; 
Whitebg(f) % Figure black-and-white inversion 
plot(simout.time,simout.signals.values,'y') % Line set to yellow to draw 
grid on % grid display 

% Specify grid line specifications 
set(gca,'GridLineStyle',':',...% Grid line type set to dotted line 
'GridColor','w',...% Gridline Color Set to White 
'GridAlpha',1) % Transparency set to 1 (

"gridline specifications described in the second half of this article.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!