필터 지우기
필터 지우기

extract non-zeros block from matrice

조회 수: 1 (최근 30일)
khatere darvish
khatere darvish 2018년 2월 26일
댓글: khatere darvish 2018년 2월 27일
I have a matrix that contains several non-zeros blocks.The rest of the elements are zero. I want to put each of these blocks in a separate matrix. how can i do it?

답변 (1개)

jonas
jonas 2018년 2월 26일
Not sure exactly what you want to do. The following creates a vector B containing all non-zeros of A
B=A(A~=0)
Do you want to extract several small matrices from a larger global matrix?
  댓글 수: 5
Jan
Jan 2018년 2월 26일
Do you have the image processing toolbox?
khatere darvish
khatere darvish 2018년 2월 27일
yes i have it. thank you so much for your help

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by