How to learnt matrix element index...

1 Ansicht (letzte 30 Tage)
Atakan
Atakan am 31 Mär. 2011
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 Kommentar
Jan
Jan am 31 Mär. 2011
This is a very basic question. Please read the "Getting Started" chapters of the documentation.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Paulo Silva
Paulo Silva am 31 Mär. 2011
m=[10 11 12
13 14 15
4 5 6
45 55 65]
[r,c]=find(m==5)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by