MATLAB: Does the LASTERR or LASTERROR function in MATLAB return the line number and stack trace of the last error found

catchcompleteerrorlastlasterrlineMATLABmessagesnumbertotaltrywhole

For example, if I am trying to track someone else's code, and I try to trap any errors using the TRY/CATCH commands with the LASTERR function, LASTERR tells me what the error is, but not where I can find it. I would like to have LASTERR return the corresponding line number and stack trace.
The LASTERROR function does not provide this information either.

Best Answer

This enhancement has been incorporated in Release 14 Service Pack 3 (R14SP3). For previous product releases, there are no workarounds