Did you notice that in R2015a, simulations now have metadata in their output?
What is simulation metadata?
The getSimulationMetadata method of the Simulink.SimulationOutput object returns a Simulink.SimulationMetadata object. It has four properties: ModelInfo, TimingInfo, UserString, and UserData. ModelInfo contains some basic information about the model and solver.
No more need to insert tic and toc calls in your model callbacks. The TimingInfo field of the metadata informs you of the time it took for your model to initialize, execute, and terminate:
If you want to add notes or relevant data, you can use the UserString and UserData properties. They can be set using their respective methods of the parent Simulink.SimulationOutput object: setUserString and setUserData.
Now it's your turn
What are you going to store in the Simulink.SimulatuonOutput UserData field? Let us know by leaving a comment here.
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.