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

24 次查看(过去 30 天)
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?

采纳的回答

the cyclist
the cyclist 2021-5-5
编辑:the cyclist 2021-5-5
Sounds like you could use either the find or ismember command.
  1 个评论
DavidL88
DavidL88 2021-5-5
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by