Create a stage and use the reportError function to
report an error 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.reportError(error);
output =
1ogical
1
The diagnostic window opens up for the model vdp. It shows the StageName and the
error message in red.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.