How would you implement:
if(m <= 0.1)
...
end
if m is not a scalar. I tried something along those lines:
array = ones(length(m), 1) .* 0.1;
if(m <= array)
...
end
without success.
How would you implement:
if(m <= 0.1)
...
end
if m is not a scalar. I tried something along those lines:
array = ones(length(m), 1) .* 0.1;
if(m <= array)
...
end
without success.
You likely want
if all(m <= 0.1)
but maybe
if any(m <= 0.1)
It's even one of the examples for the all
function.
But in fact the documentation for if
suggests that
if (m <= 0.1)
should work just fine also.