| Author |
Message |
hbaocr
Joined: 13 May 2007 Posts: 247 Helped: 15 Location: Hochiminh City university of technology (VietNam)
|
14 Nov 2007 18:44 help me to analyse spectrum of discrete signal in matlab |
|
|
|
|
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
|
|
| Back to top |
|
 |
brmadhukar
Joined: 21 Jun 2002 Posts: 844 Helped: 29
|
12 Dec 2007 3:57 Re: help me to analyse spectrum of discrete signal in matlab |
|
|
|
|
you can
1. plot the signal
2. look at the spectrum of the signal [pwelch]
|
|
| Back to top |
|
 |
Sal
Joined: 29 Nov 2005 Posts: 310 Helped: 37
|
15 Dec 2007 10:18 help me to analyse spectrum of discrete signal in matlab |
|
|
|
|
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
|
|
| Back to top |
|
 |
Google AdSense

|
15 Dec 2007 10:18 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
mehdimajidi
Joined: 23 Nov 2005 Posts: 6 Helped: 1
|
18 Dec 2007 6:35 Re: help me to analyse spectrum of discrete signal in matlab |
|
|
|
|
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.
|
|
| Back to top |
|
 |
cesare
Joined: 21 Feb 2002 Posts: 176 Helped: 7
|
18 Dec 2007 6:41 Re: help me to analyse spectrum of discrete signal in matlab |
|
|
|
|
| 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.
|
|
| Back to top |
|
 |