Matlab: How to catch warning -
Matlab: How to catch warning -
i running info processing work in matlab , solver uses backslash operator. sometimes, warning this:
warning: rank deficient, rank = 1390, tol = 1.335195e-010. warning: rank deficient, rank = 1386, tol = 1.333217e-010. i grab warnings. trying convert warning error , grab described here under title “trapping warnings”: http://undocumentedmatlab.com/blog/trapping-warnings-efficiently in example, next string has been used convert warning error:
s = warning('error', 'matlab:delete:permission'); however, not sure string utilize case. tried using
s = warning('error', 'warning: rank deficient’); but, did not work. help appreciated.
regards, dk
you need specify warning identifier, not warning text. can find identifier using two-output form of lastwarn:
[msgstr, msgid] = lastwarn in case, think identifier want 'matlab:rankdeficientmatrix'.
matlab warnings
Comments
Post a Comment