How can I remove zero values from the followning label matrix?.

2 vues (au cours des 30 derniers jours)
moon sun
moon sun le 22 Sep 2014
Commenté : moon sun le 22 Sep 2014
How can I remove zero values form the following
?.

Réponse acceptée

Hikaru
Hikaru le 22 Sep 2014
If your matrix is A, then
A(A==0) = []
will remove the zeros. But it will change the matrix into a vector.
If you want to keep the matrix in the same shape, maybe
A(A==0) = NaN
  2 commentaires
moon sun
moon sun le 22 Sep 2014
Thank you Hikaru
moon sun
moon sun le 22 Sep 2014
Than you so much, Hikaru, i got it by your code .

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