Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
moon sun
moon sun am 22 Sep. 2014
Kommentiert: moon sun am 22 Sep. 2014
How can I remove zero values form the following
?.

Akzeptierte Antwort

Hikaru
Hikaru am 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

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by