Thread Subject: DFT identity of derivative

Subject: DFT identity of derivative

From: wasim nawaz

Date: 14 Nov, 2009 05:38:03

Message: 1 of 3

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
                                    

Subject: DFT identity of derivative

From: dbd

Date: 14 Nov, 2009 19:10:36

Message: 2 of 3

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

Subject: DFT identity of derivative

From: Matt

Date: 14 Nov, 2009 21:53:01

Message: 3 of 3

Note also that if DFT[x(n)]=X(k), then we have the identitity,

DFT[x(n-1)]= exp(j*2*pi*k)*X(k) %shift n-1 is modula N

This means that the DFT of a first difference approximation to the derivative will be

DFT[x(n)-x(n-1)]= ( exp(j*2*pi*k) - 1 ) *X(k)

and not something like k*X(k).

Tags for this Thread

Everyone's Tags:

fft

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
fft Moon 14 Nov, 2009 00:39:01
rssFeed for this Thread

Contact us at files@mathworks.com