Effacer les filtres
Effacer les filtres

replace minimum value of each column with nan

2 vues (au cours des 30 derniers jours)
Leela Sai Krishna
Leela Sai Krishna le 18 Mar 2019
Commenté : madhan ravi le 18 Mar 2019
i have a 10*10 matrix.
How to replace the minimum value from each column with nans.
ex; [10,5
2,8
8,1];
the desired out put should be like
[10,5
nan,8
8,nan];
thanks

Réponse acceptée

madhan ravi
madhan ravi le 18 Mar 2019
Modifié(e) : madhan ravi le 18 Mar 2019
M(M==min(M))=nan % where M is your matrix
  4 commentaires
Leela Sai Krishna
Leela Sai Krishna le 18 Mar 2019
thanks a lot it works.......
and just one more query. plz help me on this
A=[10,0.5
1,8
8,0];
A_max =max(A);
out=[10,8];
i want to replace values <15%A_max with nans
output matrix
Out=[10,nan %0.5 is less than the 15%8
nan,8 % 1 is <15%10
8,nan];

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical 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