| MATLAB® | ![]() |
#include "matrix.h" void mxAssertS(int expr, char *error_message);
Value of assertion
Description of why assertion failed
mxAssertS is similar to mxAssert, except mxAssertS does not print the text of the failed assertion. mxAssertS checks the value of an assertion, and continues execution only if the assertion holds. If expr evaluates to logical 1 (true), mxAssertS does nothing. If expr evaluates to logical 0 (false), mxAssertS prints an error to the MATLAB® command window consisting of the filename and line number where the assertion failed and the error_message string. The error_message string allows you to specify a better description of why the assertion failed. Use an empty string if you don't want a description to follow the failed assertion message.
After a failed assertion, control returns to the MATLAB command line.
Note that the mex script turns off these assertions when building optimized MEX-functions, so use this for debugging purposes only. Build the MEX-file using the syntaxmex -g filename in order to use mxAssertS.
![]() | mxAssert (C) | mxCalcSingleSubscript (C and Fortran) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |