[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49436] fftshift: incorrect frequency scale in

From: Martin Kunz
Subject: [Octave-bug-tracker] [bug #49436] fftshift: incorrect frequency scale in help text
Date: Tue, 25 Oct 2016 08:54:52 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0


                 Summary: fftshift: incorrect frequency scale in help text
                 Project: GNU Octave
            Submitted by: mkunz
            Submitted on: Tue 25 Oct 2016 08:54:50 AM GMT
                Category: Documentation
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Documentation
                  Status: None
             Assigned to: None
         Originator Name: mkunz
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.0-rc2
        Operating System: Microsoft Windows



The help text for fftshift states:

If X is a vector of N elements corresponding to N time samples
spaced by dt, then 'fftshift (fft (X))' corresponds to frequencies

   f = [ -(ceil((N-1)/2):-1:1)*df 0 (1:floor((N-1)/2))*df ]

where df = 1 / dt.

I think this is wrong. Let N = 10 and dt = 1, then f would range from -5 to
+5, whereas the Nyquist frequency would be 0.5.
To my mind the correct formula is

   f = [ -(ceil((N-1)/2):-1:1)*df 0 (1:floor((N-1)/2))*df ]/N


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]