How to check a number is in a array or not?
Ältere Kommentare anzeigen
a=[8 9 6 5 3], I want to know 5 is there or not.
Akzeptierte Antwort
Weitere Antworten (1)
sum(a==5) > 0
any(a==5)
Kategorien
Mehr zu Whos finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!