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

 채택된 답변

Hikaru
Hikaru 2014년 9월 22일
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

Thank you Hikaru
Than you so much, Hikaru, i got it by your code .

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating 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