help me to analyse spectrum of discrete signal in matlab

Status
Not open for further replies.

hbaocr

Full Member level 4
Joined
May 13, 2007
Messages
232
Helped
25
Reputation
48
Reaction score
4
Trophy points
1,298
Location
Hochiminh City university of technology (VietNam)
Activity points
2,765
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
 

you can
1. plot the signal
2. look at the spectrum of the signal [pwelch]
 

Hi

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.

good luck

sal
 

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.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…