MATLAB COMPILER RELEASE NOTES User's Guide Page 194

  • Download
  • Add to my manuals
  • Print
  • Page
    / 264
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 193
mbreal
7-16
7mbreal
Purpose Assert variable is real.
Syntax mbreal(n)
Description The statement
mbreal(x)
causes the MATLAB Compiler to impute that x is real (not complex). At
runtime, if
mbreal determines that x holds a complex value, mbreal issues an
error message and halts execution of the MEX-file.
mbreal tells the MATLAB interpreter to check whether x holds a real value. If
x does not, mbreal issues an error message and halts execution of the M-file.
The MATLAB interpreter does not use
mbreal to impute x.
Note that
mbreal only tests x at the point in an M-file or MEX-file where an
mbreal call appears. In other words, an mbreal call tests the value of x only
once. If
x becomes complex after the mbreal test, mbreal cannot issue an error
message.
A real value is any scalar, vector, or matr ix that contains no imaginary
components.
Example This code in MATLAB causes mbreal to generate an error message b ecause n
contains an imag inary component.
n = 17 + 5i;
mbreal(n);
??? Error using ==> mbreal
Argument to mbreal must be real.
See Also mbrealscalar, mbrealvector, mcc
Page view 193
1 2 ... 189 190 191 192 193 194 195 196 197 198 199 ... 263 264

Comments to this Manuals

No comments