How to check a number is in a array or not?
1.468 views (last 30 days)
Show older comments
Arnab Pal
on 29 Aug 2017
Commented: Putri Basenda Tarigan
on 16 Nov 2020
a=[8 9 6 5 3], I want to know 5 is there or not.
0 Comments
Accepted Answer
Guillaume
on 29 Aug 2017
ismember(5, a)
1 Comment
Putri Basenda Tarigan
on 16 Nov 2020
Excuse me Sir,
For the same problem, if we don't know that the number is 5, how to code to get that the number is 5?
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!