octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #45932] ifft(fft(x)) is not real for x real


From: Marco Caliari
Subject: [Octave-bug-tracker] [bug #45932] ifft(fft(x)) is not real for x real
Date: Fri, 11 Sep 2015 14:42:13 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0

URL:
  <http://savannah.gnu.org/bugs/?45932>

                 Summary: ifft(fft(x)) is not real for x real
                 Project: GNU Octave
            Submitted by: caliari
            Submitted on: Fri 11 Sep 2015 02:42:12 PM GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Inaccurate Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

If x is a real vector, say


n = 101;
x = rand(n,1);


then


xhat = fft(x);


has the property xhat(1+i)=conj(xhat(n+1-i)). In this, it seems to me that
Octave uses the rfftw transform of FFTW. But if we now compute 


ifft(xhat)


we get a complex vector with spurious imaginary parts. For comparison, Matlab
gives a real vector. Would'n it possibile to use an (inverse) rfftw transform
of FFTW? Or, alternatively, check the input and return only the real part?
Notice that this report is related to #43742.

Marco




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45932>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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