MATLAB COMPILER RELEASE NOTES User's Guide Page 195

  • Download
  • Add to my manuals
  • Print
  • Page
    / 264
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 194
mbrealscalar
7-17
7mbrealscalar
Purpose Assert variable is real scalar.
Syntax mbrealscalar(n)
Description The statement
mbrealscalar(x)
causes the MATLAB Compiler to impute that x is a real scalar. At runtime, if
mbrealscalar determines that x holds a value other than a real scalar,
mbrealscalar issues an error message and halts execution of the MEX-file.
mbrealscalar tell s t he MAT LAB interpreter to check whether x holds a real
scalar value. If
x does not, mbrealscalar issues an error message and halts
execution of the M-file. The MATLAB interpreter does not use
mbrealscalar
to impute x.
Note that
mbrealscalar only tests x atthepointinan M-fileorMEX-filewhere
an
mbrealscalar call appears. In other words, an mbrealscalar call tests the
value of
x only once. If x becomes a vector after the mbrealscalar test,
mbrealscalar cannot issue an error message.
mbrealscalar defines a real scalar as any value that meets the criteria of both
mbreal and mbscalar.
Example This code in MATLAB causes mbrealscalar to generate a n error message
because, although
n contains only real numbers, n is not a scalar.
n = [17.2 15.3];
mbrealscalar(n)
??? Error using ==> mbscalar
Argument of mbscalar must be scalar.
See Also mbreal, mbscalar, mbrealvector, mcc
Page view 194
1 2 ... 190 191 192 193 194 195 196 197 198 199 200 ... 263 264

Comments to this Manuals

No comments