x=[-6:0.01:6];
n=size(x,2);
y=zeros(n,1);
for i=1:n
  c=pi*(x(i)-1/2);
  if c==0
    y(i)=1;
  else
    y(i)=(sin(2*c)-sin(c))/c;
  end;
end;
plot(x,y,'black');
axis([-6 6 -1 1.5]);
axis on;
