d = 1;

x = linspace(-d,d);

y1 = sin(pi*x/d);

y2 = cos(pi*x/(2*d));

plot(x,y1); hold on;

plot(x,y2,'r');

grid on;



y3 = 4/(3*pi)*cos(pi*x/(2*d))+1/2*sin(pi*x/d);

plot(x,y3,'g');

y4 = 8/(3*pi)*sin(pi*x/d);

plot(x,y4,'m');