How to learnt matrix element index...

for ex; I have matrix written below.
10 11 12
13 14 15
4 5 6
45 55 65
Is there any comment or function to retrieve index of element...
for example I want to learn index of 5,function should give me an ans=(3,2)
...

댓글 수: 1

Jan
Jan 2011년 3월 31일
This is a very basic question. Please read the "Getting Started" chapters of the documentation.

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

답변 (1개)

Paulo Silva
Paulo Silva 2011년 3월 31일

1 개 추천

m=[10 11 12
13 14 15
4 5 6
45 55 65]
[r,c]=find(m==5)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

질문:

2011년 3월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by