log2

Navigation:  Language Reference > Functions > Arithmetic >

log2

Previous pageReturn to chapter overviewNext page

Syntax

Y = log2(X);

Description

Returns the base 2 logarithm of X or the elements of X.

Examples

X

log2(X)

1

0

2.1

1.0704

4

2

[1,2.1;4,1]

[0,1.0704;2,0]

-2.6

not allowed!

Limitations

X and Y must have the same size. X or the elements of X must be larger than zero.