Return SimulationMetadata object for simulation


mData = getSimulationMetadata(simout)
mData = simout.getSimulationMetadata()


mData = getSimulationMetadata(simout) retrieves metadata information in a SimulationMetadata object from Simulink.SimulationOutput object.

mData = simout.getSimulationMetadata() is a syntax with dot notation to retrieve metadata information in a SimulationMetadata object.

Input Arguments

expand all

Simulation output to get metadata from.

Output Arguments

expand all

SimulationMetadata object stored in the simout SimulationOutput object.


expand all

Simulate the vdp model and retrieve metadata information from the simulation.

Simulate the vdp model. Save the results of the Simulink.SimulationOutput object in simout

 simout = sim(bdroot,'ReturnWorkspaceOutputs','on');

Retrieve metadata information about this simulation using mData.

mData = 

  SimulationMetadata with properties:

        ModelInfo: [1x1 struct]
       TimingInfo: [1x1 struct]
    ExecutionInfo: [1x1 struct]
       UserString: ''
         UserData: []


A simpler alternative to use dot notation with the SimulationMetadata property. For example:


Another alternative is to display simulation metadata in the Variable Editor using one of these approaches:

  • Select the Show Simulation Metadata check box (which displays the data in a tree structure).

  • Double-click the SimulationMetadata row.

  • View the SimulationMetadata object.