Code:
if (round(xw(1))>2) & (round(xw(2))>2) & (round(xw(1))<h-1) & (round(xw(2))<w-1)
W0 = img(round(xw(1))-2:round(xw(1))+2,round(xw(2))-2:round(xw(2))+2);
else
NA=1;
break
endif
xw is a column vector which contains the co-ordinates of a point.
h and w are the dimensions of an image.
I am using these lines of codes in OCTAVE
But when I run the function which contains these lines I get a warning
warning: Matlab-style short-circuit operation performed for operator &
Is it that in spite of using &, octave is performing && operation?
I learnt that if I use && then depending on the first statement is True or False, the next statements are evaluated.
So, is this what is happening when I get this warning? What is the solution to this problem then?
I want to check if all the statements are True and not just the first one.