Problem :
I have very simple problem that currently looking for the fast implementation in Matlab. I have below array of values:
b = floor(rand(5,5).*255)
I also have the similarly sized threshold array :
b_thresh = floor(rand(5,5).*255)
I want to use the value of b unaltered. I thought I can use something like the below:
b(b>= b_thresh .* 0.4 && b <b_thresh.* 0.5) = ((b - b_thresh.*0.4)/(b_thresh.*0.5 b_thresh.*0.4)) .* b;
But, I am facing below error :
Operands to || and && operations must be convertible to logical scalar values
How can I resolve the issue?