Find indices of column/row in double that have matching value

a = 5.786
b = 14x308 double (all cells contain numerical values)
Assuming there is one cell in 'b' with a value that matches 'a' exactly - how do I found the column/row indices in b of this matching cell?

 Accepted Answer

Sounds like you could use either the find or ismember command.

1 Comment

Thanks that worked! I had tried using find with ismember or intersect but hadn't worked. Just used [c latency] = find(a == b); and that worked.

Sign in to comment.

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Tags

Asked:

on 5 May 2021

Commented:

on 5 May 2021

Community Treasure Hunt

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

Start Hunting!