0% found this document useful (0 votes)
146 views2 pages

Standard Deviation of Matrix Elements - MATLAB Std2

std2 calculates the standard deviation of the values in a matrix or GPU array. It returns a scalar value representing the standard deviation. The function works for numeric or logical arrays and GPU arrays, returning a double scalar or double GPU scalar respectively. It computes the standard deviation by finding the standard deviation of the flattened input array.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views2 pages

Standard Deviation of Matrix Elements - MATLAB Std2

std2 calculates the standard deviation of the values in a matrix or GPU array. It returns a scalar value representing the standard deviation. The function works for numeric or logical arrays and GPU arrays, returning a double scalar or double GPU scalar respectively. It computes the standard deviation by finding the standard deviation of the flattened input array.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

std2

Standarddeviationofmatrixelements

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

Description
B=std2(A)returnsthescalarB,thestandarddeviationofthevaluesinA.
gpuarrayB=std2(gpuarrayA)performstheoperationonaGPU.TheinputimageisagpuArrayimage.The
outputisagpuArrayscalar.ThissyntaxrequirestheParallelComputingToolbox.

ClassSupport
Acanbenumericorlogical.Bisascalarofclassdouble.
gpuarrayAisanumericorlogicalgpuArray.gpuarrayBisascalardoublegpuArray.

Examples
Calculatethestandarddeviation.
I=imread('liftingbody.png');
val=std2(I);
val=
31.6897
CalculatethestandarddeviationonaGPU.
I=gpuArray(imread('liftingbody.png'));
val=std2(I)

MoreAbout
Algorithms
std2computesthestandarddeviationofthearrayAusingstd(A(:)).

SeeAlso
corr2|gpuArray|mean|mean2|std

IntroducedbeforeR2006a

collapseall

You might also like