User`s guide
5 Controlling Code Generation
5-38
Controlling Information in Run-Time Errors
Use the debugline:setting option to include source filenames and line
numbers in run-time error messages. The possible values for
setting are:
•
on
•off
Not specifying any debugline setting uses the default of off, which does not
include filenames and line numbers in the generated run-time error messages.
For example, given the M-file,
tmmult.m, which in MATLAB wouldproducethe
error message
Inner matrix dimensions must agree
function tmmult
a = ones(2,3);
b = ones(4,5);
y = mmult(a,b)
function y = mmult(a,b)
y = a*b;
If you create a Compiler-generated MEX-file with the command
mcc -x tmmult
and run it, you r results are
tmmult
??? Inner matrix dimensions must agree.
Error in ==> <matlab>\toolbox\compiler\tmmult.dll
The information about where the error occurred is not available. However, if
you compile
tmmult.m and use the -A debugline:on option as in
mcc -x -A debugline:on tmmult