Azzera filtri
Azzera filtri

Indexing numbers for 2 or more specific values in a vector?

1 visualizzazione (ultimi 30 giorni)
How can I find the index numbers for 2 or more specific values in a vector called vec? Something like h=find(vec==26 & vec==437)

Risposta accettata

Bruno Luong
Bruno Luong il 7 Ago 2019
h = find(vec==26 | vec==437)
or
h = find(ismember(vec,[27 437]))

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by