MATLAB COMPILER RELEASE NOTES Guía de usuario Pagina 187

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 264
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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
Vista de pagina 186
1 2 ... 182 183 184 185 186 187 188 189 190 191 192 ... 263 264

Comentarios a estos manuales

Sin comentarios