Standard deviation of matrix elements
B = std2(A)
Read a grayscale image into the workspace, then calculate the standard deviation of the pixel intensity values.
I = imread('liftingbody.png'); val = std2(I)
val = 31.6897
Read a grayscale image into the workspace as a
then calculate the standard deviation of the pixel intensity values
using a GPU.
I = gpuArray(imread('liftingbody.png')); val = std2(I)
A— Input data
Input data, specified as a numeric or logical array.
To perform the computation using a GPU, specify
gpuArray that contains a
numeric or logical array.
B— Standard deviation
Standard deviation of input data, returned as a numeric scalar. If the data type of
single, then the data type
B is also single. Otherwise, the data type of
If the standard deviation is computed using a GPU, then
B is returned as a
gpuArray containing a
This function fully supports GPU arrays. For more information, see Image Processing on a GPU.