|
On Nov 13, 9:38 pm, "wasim nawaz" <wasim.na...@yahoo.com> wrote:
> Hi,
> i am new to Mathworks and i am using matlab for FFT calculations.
> when i take FFT of say a simple sequence [1 2 3 4] it turns out to be
> [10 -2+2i -2 -2-2i]
> and when i take FFT of gradient([1 2 3 4]) result comes up as
> [4 0 0 0], everything is alright till now.
> but when i try to verify the DFT identity related to gradient
> f'(n)=2*pi*i*k*F(K) where f'(n) is derivative of original sequence.
> and F(K) is FFT of original sequence.
> then it does not work.
>
> see 2*pi*i*k*[10 -2+2i -2 -2-2i] is not equal to [4 0 0 0]
> what is wrong with this?
> Thanks
There are at least two issues.
1) The derivative identity of the continuous Fourier transform (FT)
can only be extended to the finite discrete Fourier transform (DFT)
for these functions for which the DFT of the samples equals the
samples of the FT.
2) For signals satisfying 1), the Matlab's gradient() does not
necessarily represent the derivative.
Consider samples of a cosine function:
>> x = [1 .707107 0 -.707107 -1 -.707107 0 .707107];
>> fft(x)
ans =
Columns 1 through 7
0 4.0000 0 -0.0000 0 -0.0000 0
Column 8
4.0000
>> gradient(x)
ans =
Columns 1 through 7
-0.2929 -0.5000 -0.7071 -0.5000 0 0.5000 0.7071
Column 8
0.7071
Dale B. Dalrymple
|