x=[-3:0.001:3];
n=size(x,2);
y=zeros(n,1);
for i=1:n
  if (x(i)>=-1.5)&(x(i)<=1.5)
    y(i)=1;
  end;
end;
plot(x,y,'black');
axis([-3 3 -0.5 1.5]);
axis on;
