x=[-3:0.01:3];
n=size(x,2);
y=zeros(n,1);
for i=1:n
  y(i)=abs(cos(x(i)/2));
end;
plot(x,y,'black');
axis([-3 3 -0.5 1.5]);
axis on;
