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.
Create an array of SimulationInput objects by using the
for loop.
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.
Open the Diagnostic Viewer to show errors and warnings in the first model of the
SimulationOutput object.