MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Betriebsanweisung Seite 194

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 274
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 193
mbchar
7-8
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 run-time,
if
mbchar determines that x does not hold 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 issues an error message and halts execution of the M-file.
The MATLAB interpreter 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 only 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
Seitenansicht 193
1 2 ... 189 190 191 192 193 194 195 196 197 198 199 ... 273 274

Kommentare zu diesen Handbüchern

Keine Kommentare