matlab psd
%EXAMPLE: Spectral analysis of a signal that contains a 200Hz cosine plus noise.
Fs = 1000; t = 0:1/Fs:.296;
x = cos(2*pi*t*200);
h = spectrum.welch; % Instantiate a welch object.
psd(h,x,'Fs',Fs); % Plot the one-sided PSD.
Folks:
I am curious about above example in matlab. I run this example and found that the PSD is much like what we get from sprectrum analyzer.
However, the psd function for a cosine wave shouldn't be a impulse function located at ω?
What's wrong?