MATLAB: Is it possible to log all warnings which occur during a simulation in Simulink 7.6 (R2010b)

alllastwarnlogloggingsimulinksllastwarningwarning

During a simulation many different warnings can occur.
Unfortunately LASTWARN only gives me the last occured warning.
I would like to capture all warnings which occured.

Best Answer

The ability to log all occured warnings during a simulation is not available in Simulink.
To work around this you can do the following:
diary on;
sim(<...>);
diary off;
DIARY will create a txt-file which all command line output will be saved in.
After the simulation you can manually check the file and see which warnings occured or do a post-processing to automatically extract the occured warnings.