I have a analog signal through the lowpass Filter(fc=40hz) then I sample it which fsample =40hz, and I recieve 200 pieces of that signal into my computer by sampling which f(sample) =40hz.And my problem is how I can analyse spectrum of those 200 pieces discrete signal in matlab.
PLZ help me some code matlab or tell me which macro in Matlab can do it.
thank you very Much
If the signal maximum frequency is 40 Hz, at least you should sample it at 80Hz. you need to read about the sampling theorem, otherwise you just are analyzing noise.
if maximum frequency of your signal is 40 Hz firs you have to sampled that with a frequency greater than 2*40 Hz. Because you have to consider Nyquist rule.
after the convinient sampling you can see the spectrum of your signal. one way is pwelch function in MATLAb. The other way is this function
Y=abs(fft(x,1024)) ;
plot((0:511)/512*Fs/2,Y(1:512));
which Fs is sampling frequency and the size of FFt is 1024.
You shhould also consider windowing. By taking the samples as they are you are implicitly using a rectangular window which modifies the spectrum of the original signal.