Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

reallog

Natural logarithm for nonnegative real arrays

Syntax

Y = reallog(X)

Description

Y = reallog(X) returns the natural logarithm of each element in array X. Array X must contain only nonnegative real numbers. The size of Y is the same as the size of X.

Examples

collapse all

Create a 4-by-4 matrix and compute the natural log of each element.

X = magic(4)
X =

    16     2     3    13
     5    11    10     8
     9     7     6    12
     4    14    15     1

Y = reallog(X)
Y =

    2.7726    0.6931    1.0986    2.5649
    1.6094    2.3979    2.3026    2.0794
    2.1972    1.9459    1.7918    2.4849
    1.3863    2.6391    2.7081         0

More About

collapse all

Tall Array Support

This function fully supports tall arrays. For more information, see Tall Arrays.

See Also

| |

Introduced before R2006a

Was this topic helpful?