finding position in matrix

1 vue (au cours des 30 derniers jours)
sarp karayegen
sarp karayegen le 20 Avr 2020
I couldnt find the way to figure out how find position M(m,n) matrix can you help me ?
  2 commentaires
Michael Soskind
Michael Soskind le 20 Avr 2020
If you want to find a list of positions, you can use:
find(condition)
Where condition might look like M == 1
Alternatively, you could simply use
M == 1
Which would return a logical array of size n x m, meaning that calling M(M==1) would give you a list of the values at the indices above.
Ameer Hamza
Ameer Hamza le 20 Avr 2020
sarp, can you further elaborate your question with an example of what you mean by "find position M(m,n)"?

Connectez-vous pour commenter.

Réponses (1)

Jyotsna Talluri
Jyotsna Talluri le 23 Avr 2020
[row,column] = find(M ==element);

Catégories

En savoir plus sur Numeric Types dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by