function s = shiftspec(Wd,p,plt) n = [1:1:length(p)]; s = p.*exp(j*n*Wd); if plt == 1 S = fft(s); Smag = sqrt(real(S).^2+imag(S).^2); subplot(4,1,2),stem(Smag) end