using logical mask in array
33 次查看(过去 30 天)
显示 更早的评论
hello! i have this array: C=[1 1 1 2 3 4 5 5 5 5 6 6 6 6 ] and i wana to get the index of array where C=5, i can use res=find(C==5), but i went to use logical masks to improve performance in my code, so can any one tel me how i use logical mask ?? ^^ thanks
0 个评论
回答(1 个)
Image Analyst
2017-8-14
Mask = C==5;
5 个评论
Image Analyst
2017-8-15
So, if we're done then could you "Accept" the answer? Otherwise explain what you still need help on.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Author Block Masks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!