dsp - Perform the Power Spectral Density of the signal x
Perform the Power Spectral Density of the signal x.
x=sin(0:0.01:2*%pi); [D]=dsp(x); scf; subplot(2,1,1);plot(x);xtitle('x'); lx=length(D); if (modulo(lx,2)==1) ind=-int(lx/2):int(lx/2); else ind=-int(lx/2):int(lx/2)-1; end subplot(2,1,2);plot2d(ind,D);xtitle('Power Spectral Density');