MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Betriebsanweisung Seite 195

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 274
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 194
mbcharscalar
7-9
7mbcharscalar
Purpose Assert variable is a character scalar
Syntax mbcharscalar(x)
Description The statement
mbcharscalar(x)
causes the MATLAB Compiler to impute that x is a character scalar, i.e., an
unsigned short variable. At run-time, if
mbcharscalar determines that x holds
a value other than a character scalar,
mbcharscalar issues an error message
and halts execution of the MEX-file.
mbcharscalar tells the MATLAB interpreter to check whether x holds a
character scalar value. If
x does not, mbcharscalar issues an error message
and halts execution of the M-file. The MATLAB interpreter does not use
mbcharscalar to impute x.
Note that
mbcharscalar only tests x at the point in an M-file or MEX-file where
an
mbcharscalar call appears. In other words, an mbcharscalar call tests the
value of
x only once. If x becomes a vector after the mbcharscalar test,
mbcharscalar cannot issue an error message.
mbcharscalar defines a character scalar as any value that meets the criteria of
both
mbchar and mbscalar.
Example This code in MATLAB generates an error message:
n = ['hello' 'world'];
mbcharscalar(n)
??? Error using ==> mbscalar
Argument of mbscalar must be scalar.
See Also mbchar, mbcharvector, mbreal, mbscalar, mbvector, mbintscalar,
mbintvector, mcc
Seitenansicht 194
1 2 ... 190 191 192 193 194 195 196 197 198 199 200 ... 273 274

Kommentare zu diesen Handbüchern

Keine Kommentare