Standard Deviation of Matrix Elements - MATLAB Std2
Standard Deviation of Matrix Elements - MATLAB 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