The results from a simulation when using the SIM command are strored in an object of the class Simulink.Simulationoutputs.
In order to access these values, refer to the code below that can be used to access results from a simple simulation of a model with a 'To Workspace' block.
simOut = sim('vdp_ex', 'StopTime', '10');
workspace_struct = get(simOut, 'simout');
The 'workspace_struct' contains the fields of that are saved from the 'To Workspace' block. In order to access the values in this structure, I execute:
values = workspace_struct.signals.values;
Please execute the lines of code above agiainst the model that is attached to this solutionl.
Best Answer