getSimulationMetadata

Return SimulationMetadata object for simulation

Syntax

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

Description

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.

Examples

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

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

Retrieve metadata information about this simulation using mData.

 mData=simout.getSimulationMetadata()
mData = 

  SimulationMetadata with properties:

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

Alternatives

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

simOut.SimulationMetadata.ModelInfo

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.