Questions about the fft function in Matlab
- From: "c " <clst08@xxxxxxxxxx>
- Date: Sun, 19 Apr 2009 16:45:03 +0000 (UTC)
Hi all
I have made a Fourier transform, based on the example in the help-function in Matlab, but I have a few questions about the calculation in the fft-function.
From the example in Matlab Help I got this:
L = numbers of samples in the sampled signal
Fs = sampling frequency
(1) NFFT = 2^nextpow2(L);
(2) Y = fft(y,NFFT)/L;
(3) f = Fs/2*linspace(0,1,NFFT/2+1);
(4) plot(f,2*abs(Y(1:NFFT/2+1)))
(5) title('Single-Sided Amplitude Spectrum of y(t)')
(6) xlabel('Frequency (Hz)')
(7) ylabel('|Y(f)|')
Why is the fft divided by L? (2)
When plotting, why is the absolute value of the signal multiplied by 2? (4)
About units:
If I have sampled my signal in Volts, what unit can I put on the y-axis of the magnitude of the Fouriertransform?
I hope somebody would like to help me.
Best regards
Camilla
.
- Follow-Ups:
- Re: Questions about the fft function in Matlab
- From: Greg Heath
- Re: Questions about the fft function in Matlab
- Prev by Date: Re: 2d vectorization challenge
- Next by Date: Summation in ODE
- Previous by thread: Re: Version Compatibility
- Next by thread: Re: Questions about the fft function in Matlab
- Index(es):
Relevant Pages
|
Loading