How do I find the index of a known number? (reverse indexing?)

1 view (last 30 days)
I have a matrix M.
I have a number XXXX.
I want to find the index of this number within my matrix M.
How can I do this?

Accepted Answer

Sean de Wolski
Sean de Wolski on 3 Apr 2014
idx = find(M==xxxx)

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!