Searching matrix which contain specific value?
显示 更早的评论
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 个)
madhan ravi
2019-8-17
编辑:madhan ravi
2019-8-17
any(matrix(:)==value) % 1 means true ,false otherwise
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!