Searching matrix which contain specific value?
Show older comments
Hi, i got two matrices of same size? lets say i am searching for a particular value? how can i use a counter loop to Return 1 if that matrix contain that value and return 0 if that matrix doesn't not contain the value?
1 Comment
Bishwam Pattnaik
on 17 Aug 2019
Answers (1)
madhan ravi
on 17 Aug 2019
Edited: madhan ravi
on 17 Aug 2019
any(matrix(:)==value) % 1 means true ,false otherwise
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!