Why am I getting this error? The matrices are absolutely of the same size:
L=rand(4,1000);
for i=1:1000;
A(i)=logzn(0.1,0.4,L(4,i));
B(i)=logzn(0.3,0.7,L(4,i));
C(i)=logzn(0.5,1.0,L(4,i));
end
F=(~A&B | ~B&C);
Here's the logzn function:
function [ y ] = logzn( aMin,aMax,x )
if ((aMin<=x)&&(aMax>=x))
y=1;
else
y=0;
end
Here's the error I get: Error using & Matrix dimensions must agree.