MATLAB: I am trying to get only the values for w80 less than 50 and different of ww80. In this case I wanna skip the values (7,13,19) , what am I doing wrong

for loop skip values

ww80=(6+1):6: (10*6);
for rr=1:length(ww80)
if (ww80(rr))>=(50);
break
else
X=rr;
end
end
w80=(2+1):2: (10*2);
for ii=1:length(w80)
if (w80(ii))>=(50);
break
else w80~=ww80;
Y=ii;
end
end

Best Answer

One line:
res=setdiff(w80(w80<50),ww80)