Access and display values of simulation results
output
= get(simOut, 'VarName
')
output
= simOut.get('VarName
')
accepts one variable name. Specify output
= get(simOut
, 'VarName
')VarName
inside single quotes.
is a syntax with dot notation to accept one variable name.output
= simOut.get('VarName
')
Tip
A simpler alternative to using the get function is to use dot
notation. For example, to access data for the xout
output
variable, you can use this command:
simOut.xout
|
Value of the logged variable name specified in input. |
Simulate vdp
and store the values of the
variable youtNew in yout.
simOut = sim('vdp','SimulationMode','rapid','AbsTol','1e-5',... 'SaveState','on','StateSaveName','xoutNew',... 'SaveOutput','on','OutputSaveName','youtNew'); yout = simOut.get('youtNew')
A simpler alternative is to use dot notation. For example, to access data for the
xout
output variable, you can use this
command:
simOut.xout
Another alternative is to use Simulink.SimulationOutput.who
and
then Simulink.SimulationOutput.find
.