Hello,
I have a matrix 50*50 and every single elements has a value of either '0' or '1' . How can I determine all locations of all non zero elements. It would be nice if I could store the location in an array or something easy to read and understand.
Thank you

 채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 4월 3일

0 개 추천

[r,c]=find(mat~=0)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

질문:

2020년 4월 3일

댓글:

2020년 4월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by