Documentation

This is machine translation

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

std2

Standard deviation of matrix elements

Syntax

B = std2(A)
gpuarrayB = std2(gpuarrayA)

Description

B = std2(A) returns the scalar B, the standard deviation of the values in A.

gpuarrayB = std2(gpuarrayA) performs the operation on a GPU. The input image is a gpuArray image. The output is a gpuArray scalar. This syntax requires the Parallel Computing Toolbox™.

Class Support

A can be numeric or logical. B is a scalar of class double.

gpuarrayA is a numeric or logical gpuArray. gpuarrayB is a scalar double gpuArray.

Examples

Calculate the standard deviation.

I = imread('liftingbody.png');
val = std2(I);
val =

   31.6897

Calculate the standard deviation on a GPU.

I = gpuArray(imread('liftingbody.png'));
val = std2(I)

More About

collapse all

Algorithms

std2 computes the standard deviation of the array A using std(A(:)).

See Also

| | | |

Introduced before R2006a

Was this topic helpful?