log2

Computes the base-2 logarithm of a matrix.

Syntax

R = log2(x)

[F,E] = log2(x)

Inputs

x
Type: double | complex
Dimension: scalar | vector | matrix

Outputs

R
The returned values.
Type: double | complex
Dimension: scalar | vector | matrix.
The mantissa and exponent components of the real values.
F,E
X = F.*2.^E
Type: double
Dimension: scalar | vector | matrix.

Examples

Scalar input:

R = log2(2)
R = 1

Scalar input with multiple return:

[F,E] = log2(140)
F = 0.546875
E = 8