MATLAB COMPILER RELEASE NOTES Guia do Utilizador Página 201

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 200
realsqrt
7-23
7realsqrt
Purpose Square root for nonnegative real inputs.
Syntax Y = realsqrt(X)
Description realsqrt(X) returns the square root of the elements of X. The domain of
realsqrt is the s et ofall nonnegativereal numbers.If X is negativeorcomplex,
realsqrt issues an error message.
realsqrt is similar to sqrt; however, sqrt’s domain is much broader than
realsqrt’s. The domain of sqrt includes all real and all complex numbers.
Despite this larger domain, if
Y is real, then you should use realsqrt rather
than
sqrt for two reasons.
First,subsequent accessof
Y may execute moreefficientlyif Y iscalculatedwith
realsqrt rather than with sqrt.Usingrealsqrt forces t he MATLAB
Compiler to impute a real type to
X and Y.Usingsqrt typically forces the
MATLAB Compiler to impute a complex type to
Y.
Second, the compiled version of
realsqrt may run somewhat faster than the
compiled version of
sqrt. (However, the interpreted version of realsqrt may
run somewhat s lower than the interpreted version of
sqrt.)
See Also exp, log, log2, logm, log10, reallog, realpow
Vista de página 200
1 2 ... 196 197 198 199 200 201 202 203 204 205 206 ... 263 264

Comentários a estes Manuais

Sem comentários