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

 採用された回答

Hikaru
Hikaru 2014 年 9 月 22 日

2 投票

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 件のコメント

moon sun
moon sun 2014 年 9 月 22 日
Thank you Hikaru
moon sun
moon sun 2014 年 9 月 22 日
Than you so much, Hikaru, i got it by your code .

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

質問済み:

2014 年 9 月 22 日

コメント済み:

2014 年 9 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by