Test every element in matrix
Show older comments
I have an M x N matrix, where I want to test whether each element is greater than some constant a, and if it is, perform some arithmetic to it. The only way I can think of doing this is using 2 For loops nested to select each element and an If statement to perform checking. Is this the best I can do?
Accepted Answer
More Answers (0)
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!