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

31 vues (au cours des 30 derniers jours)
DavidL88
DavidL88 le 5 Mai 2021
Commenté : DavidL88 le 5 Mai 2021
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?

Réponse acceptée

the cyclist
the cyclist le 5 Mai 2021
Modifié(e) : the cyclist le 5 Mai 2021
Sounds like you could use either the find or ismember command.
  1 commentaire
DavidL88
DavidL88 le 5 Mai 2021
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by