Guy on Simulink

Simulink & Model-Based Design

Simulation Metadata!

Did you notice that in R2015a, simulations now have metadata in their output?

Simulation Metadata

What is simulation metadata?

The getSimulationMetadata method of the Simulink.SimulationOutput object returns a Simulink.SimulationMetadata object. It has four properties: ModelInfoTimingInfoUserString, and UserData. ModelInfo contains some basic information about the model and solver.

Model Metadata

Timing information

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:

Model Metadata TimingInfo

Custom information

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.

Model Metadata setUserString

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.

|
  • print

コメント

コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。