MATLAB COMPILER RELEASE NOTES Guide de l'utilisateur Page 194

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 264
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 193
mbreal
7-16
7mbreal
Purpose Assert variable is real.
Syntax mbreal(n)
Description The statement
mbreal(x)
causes the MATLAB Compiler to impute that x is real (not complex). At
runtime, if
mbreal determines that x holds a complex value, mbreal issues an
error message and halts execution of the MEX-file.
mbreal tells the MATLAB interpreter to check whether x holds a real value. If
x does not, mbreal issues an error message and halts execution of the M-file.
The MATLAB interpreter does not use
mbreal to impute x.
Note that
mbreal only tests x at the point in an M-file or MEX-file where an
mbreal call appears. In other words, an mbreal call tests the value of x only
once. If
x becomes complex after the mbreal test, mbreal cannot issue an error
message.
A real value is any scalar, vector, or matr ix that contains no imaginary
components.
Example This code in MATLAB causes mbreal to generate an error message b ecause n
contains an imag inary component.
n = 17 + 5i;
mbreal(n);
??? Error using ==> mbreal
Argument to mbreal must be real.
See Also mbrealscalar, mbrealvector, mcc
Vue de la page 193
1 2 ... 189 190 191 192 193 194 195 196 197 198 199 ... 263 264

Commentaires sur ces manuels

Pas de commentaire