how can i remove elements of matrix that are greater mean value by a factor of 3 times standard deviation?

1 vue (au cours des 30 derniers jours)
i have a matrix E(150x18x6616) and matrix M(150x18) which is mean value of E ( M(i,j) = nanmean(E(i,j,:))) and S(150x18) which is standard deviation of E ( S(i,j) = nanstd(E(i,j,:))), how can i remove elements of matrix that are greater than mean value M(i,j) by a factor of 3 standard deviation?

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 24 Fév 2015
Modifié(e) : Andrei Bobrov le 24 Fév 2015
E(bsxfun(@and,bsxfun(@gt,E,M),S==3)) = nan;

Plus de réponses (0)

Catégories

En savoir plus sur NaNs dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by