Using Simulink    

Using the To Workspace Block

The To Workspace block can be used to return output trajectories to the MATLAB workspace. The model below illustrates this use.

The variables y and t appear in the workspace when the simulation is complete. The time vector is stored by feeding a Clock block into a To Workspace block. The time vector can also be acquired by entering a variable name for the time on the Workspace I/O pane of the Simulation Parameters dialog box for menu-driven simulations, or by returning it using the sim command (see The Workspace I/O Pane for more information).

The To Workspace block can accept an array input, with each input element's trajectory stored in the resulting workspace variable.


 Using Return Variables Linearization