MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Guide de l'utilisateur Page 204

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 274
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 203
mbscalar
7-18
7mbscalar
Purpose Assert variable is scalar
Syntax mbscalar(n)
Description The statement
mbscalar(x)
causes the MATLAB Compiler to impute that x is a scalar. At run-time, if
mbscalar determines that x holds a nonscalar value, mbscalar issues an error
message and halts execution of the MEX-file.
mbscalar
tells the MATLAB interpreter to check whether x holds a scalar
value. If
x does not, mbscalar issues an error message and halts execution of
the M-file. The MATLAB interpreter does not use
mbscalar to impute x.
Note that
mbscalar only tests x at the point in an M-file or MEX-file where an
mbscalar call appears. In other words, an mbscalar call tests the value of x only
once. If
x becomes nonscalar after the mbscalar test, mbscalar cannot issue an
error message.
mbscalar defines a scalar as a matrix whose dimensions are 1-by-1.
Example This code in MATLAB causes mbscalar to generate an error message because
n does not hold a scalar:
n = [1 2 3];
mbscalar(n);
??? Error using ==> mbscalar
Argument of mbscalar must be scalar.
See Also mbint, mbintscalar, mbintvector, mbreal, mbrealscalar, mbrealvector,
mbvector, mcc
Vue de la page 203
1 2 ... 199 200 201 202 203 204 205 206 207 208 209 ... 273 274

Commentaires sur ces manuels

Pas de commentaire