for loop=1:200
if(loop<=32)
p(loop)=1;
elseif(loop<=64)
p(loop)=2;
elseif(loop<=96)
p(loop)=3;
elseif(loop<=128)
p(loop)=4;
elseif(loop<=160)
p(loop)=5;
end
end
Use this code. it works fine.
In the 'elseif' after the if block, it is already assured that loop is greater than 32. And even if you want to write it explicitly the correct way would be:
elseif(loop>32 && loop<=64)