Natural logarithm for nonnegative real arrays
Y = reallog(X)
Y = reallog(X) returns
the natural logarithm of each element in array
X must contain only nonnegative real numbers.
The size of
Y is the same as the size of
Natural Log of Matrix
Create a 4-by-4 matrix and compute the natural log of each element.
X = magic(4)
X = 4×4 16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 1
Y = reallog(X)
Y = 4×4 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
Calculate with arrays that have more rows than fit in memory.
This function fully supports tall arrays. For more information, see Tall Arrays.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
Run code in the background using MATLAB®
backgroundPool or accelerate code with Parallel Computing Toolbox™
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
Usage notes and limitations:
If the output of the function running on the GPU can be complex, then you must explicitly specify its input arguments as complex. For more information, see Work with Complex Numbers on a GPU (Parallel Computing Toolbox).
For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).
Introduced before R2006a