Standard deviation of each elements in multiple matrices
Mostrar comentarios más antiguos
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,
Respuestas (1)
Andrei Bobrov
el 20 de Nov. de 2017
A = cat(3,A1,A2,A3,...,AN); here A1,A2,...,AN - your matrices
out = std(A,[],3,'omitnan');
Categorías
Más información sobre NaNs en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!