Standard deviation of each elements in multiple matrices

Hi, I have 10 matrices of 32*35 dimensions. I want to find the standard deviation of all elements. i.e, standard deviation of 1st element in all 10 matrices , SD of 2nd element in all 10 matrices..etc, I want all the SD values in 11th matrix in 32*35 dimentions.
In addition, in the matrices i have NaN values, how to avoid those NaN values to find Standard Deviation.
Thank you,

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2017년 11월 20일
A = cat(3,A1,A2,A3,...,AN); here A1,A2,...,AN - your matrices
out = std(A,[],3,'omitnan');

댓글 수: 2

Sir, I'm getting errors on this code.
Error using var Too many input arguments.
Error in std (line 31) y = sqrt(var(varargin{:}));
Error in Standard_deviation (line 28) out = std(A,[],3,'omitnan'); italic

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 NaNs에 대해 자세히 알아보기

질문:

2017년 11월 20일

댓글:

2021년 3월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by