Y = log2(X)
[F,E] = log2(X)
log2(X) computes the base 2 logarithm of the elements of X.
[F,E] = log2(X) for a real matrix X, returns a matrix F of real numbers, usually in the range 0.5 <= abs(F) < 1, and a matrix E of integers, so that X = F.* 2.^E. Any zeros in X produce F = 0 and E = 0.
This function corresponds to the ANSI C function frexp() and the IEEE floating-point standard function logb().
[F,E] = log2(X) yields the following values.
X F E1 1/2 1pi pi/4 2-3 -3/4 2eps 1/2 -51realmax 1-eps/2 1024realmin 1/2 -1021
formathex,log,pow2,realmax,realmin
(c) Copyright 1994 by The MathWorks, Inc.