sldiagviewer.reportSimulationMetadataDiagnostics

Display errors and warnings of simulation output object in Diagnostic Viewer

Description

example

sldiagviewer.reportSimulationMetadataDiagnostics(simOutputObject) displays errors and warnings of a simulation output object in the Diagnostic Viewer.

Examples

collapse all

Simulate a model, place the Simulink.SimulationOutput object in simOut, and use the reportSimulationMetadataDiagnostics function to display errors and warnings in the Diagnostic Viewer.

Create a single SimulationInput object for the model.

model = 'vdp';
in = Simulink.SimulationInput(model);

Create an array of SimulationInput objects by using the for loop.

 in(1:5) = in;

Simulate all the SimulationInput objects in the array to output the indices of the models with errors or warnings. The output is returned in a single Simulink.SimulationOutput object.

simOut = sim(in); 
sldiagviewer.reportSimulationMetadataDiagnostics(simOut(1));

Open the Diagnostic Viewer to show errors and warnings in the first model of the SimulationOutput object.

sldiagviewer.reportSimulationMetadataDiagnostics(simOut(1));

Input Arguments

collapse all

Simulink.SimulationOutput object containing errors and warnings that are generated when you simulate the model.

Introduced in R2020b