Why dont sin and phase shifted cosine overlap? I plotted a sine wave(blue) and a 90 degrees phase shifted cosine wave (red) expecting them to overlap each other. 

x = 0:0.001:1;

%ploting sine
y = sin(2*pi*x);
plot(x, y);

hold('on');

%ploting cosine 
z = cos(2*pi*x-90);
plot(x, z);




The two graphs do not overlap.
Whats wrong with my assumption ?
You're confusing degrees and radians.

$$\sin(x)=\cos(x-\pi/2)$$

$\pi/2$ radians corresponds to 90 degrees.