Create a stage and use the reportWarning function
to report a warning message in the Diagnostic Viewer for the specified model.
>> vdp >>
% Create a stage
my_stage = sldiagviewer.createStage('StageName', 'ModelName', 'vdp');
%% write some code inside try, which will throw an error try
i = p;
catch error
end
sldiagviewer.reportWarning(error);
output =
1ogical
1
The diagnostic window opens up for the model vdp. It shows the StageName and the
warning message in yellow.