MATLAB COMPILER RELEASE NOTES Uživatelská příručka Strana 192

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 264
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 191
mbintscalar
7-14
7mbintscalar
Purpose Assert variable is integer scalar.
Syntax mbintscalar(n)
Description The statement
mbintscalar(x)
causes the MATLAB Compiler to impute that x is an integer scalar. At
runtime, if
mbintscalar determines that x holds a value other than an integer
scalar,
mbintscalar issues an error message and halts execution of the
MEX-file.
mbintscalar tells the MATLAB interpreter to check whether x holds an
integer scalar value. If
x does not, mbintscalar issues an error message and
halts execution of the M-file. The MATLAB interpreter does not use
mbintscalar to impute x.
Note that
mbintscalar only tests x at the point in an M-file or MEX-file where
an
mbintscalar call appears. In other words, an mbintscalar call tests the
value of
x only once. If x becomes a vector after the mbintscalar test,
mbintscalar cannot issue an error message.
mbintscalar defines an integer scalar as any value that meets the criteria of
both
mbint and mbscalar.
Example This code in MATLAB causes mbintscalar to generate an error message
because, although
n is a scalar, n does not hold a n integer value.
n = 4.2;
mbintscalar(n)
??? Error using ==> mbint
Argument to mbint must be integer.
See Also mbint, mbscalar, mcc
Zobrazit stránku 191
1 2 ... 187 188 189 190 191 192 193 194 195 196 197 ... 263 264

Komentáře k této Příručce

Žádné komentáře