필터 지우기
필터 지우기

how to calcul Standard deviation of matrix

조회 수: 1 (최근 30일)
bay rem
bay rem 2015년 12월 29일
답변: Star Strider 2015년 12월 29일
hello every one, i have a set of matrix and i wanna calculate a standard deviation of each matrix, here i tried :
std(M)
  • it gives me a result in a vector, i wanna have only one result here also i tried :
std(M(:))
  • an error appeared:
Error using var (line 65)
First argument must be single or double.
Error in std (line 38)
y = sqrt(var(varargin{:}));
Error in ndhif2 (line 178)
s=std(M(:))
  • i tried also:
std(double(M:))
  • here the results all the same for all matrices= 0.5477
  • i wonder how to correct it

답변 (2개)

Walter Roberson
Walter Roberson 2015년 12월 29일

Star Strider
Star Strider 2015년 12월 29일
What is the result of calling whos just before you call std?
For example:
whos('M')
s = std(M(:))

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by