MATLAB COMPILER RELEASE NOTES User's Guide Page 187

  • Download
  • Add to my manuals
  • Print
  • Page
    / 264
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 186
mbchar
7-9
7mbchar
Purpose Assert variable is a MATLAB character string.
Syntax mbchar(x)
Description The statement
mbchar(x)
causes the MATLAB Compiler to impute that x is a char matrix. At runtime,
if
mbchar determinesthatx doesnothold a char matrix, mbchar issues an error
message and halts execution of the MEX-file.
mbchar tells the MATLAB interpreter to check whether x holds a char matrix.
If
x does not, mbchar issuesan error messageand halts execution of the M-file.
The MATLAB interpret er does not use
mbchar to impute x.
Note that
mbchar only tests x at the point in an M-file or MEX-file where an
mbchar call appears. In other words, an mbchar call tests the value of x only
once. If
x becomes something other than a char matrix after the mbchar test,
mbchar cannot issue an error message.
A
char matrix is any scalar, vector, or matrix that contains o nly the char data
type.
Example This code in MATLAB causes mbchar to generate an error message because n
does not contain a char matrix.
n = 17;
mbchar(n);
??? Error using ==> mbchar
Argument to mbchar must be of class 'char'.
See Also mbcharvector, mbcharscalar, mbreal, mbscalar, mbvector, mbintscalar,
mbintvector, mcc
Page view 186
1 2 ... 182 183 184 185 186 187 188 189 190 191 192 ... 263 264

Comments to this Manuals

No comments