help-octave
[Top][All Lists]
Advanced

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

What is actual operation of fftshift when it appears in the nested form


From: Masanari Hattori
Subject: What is actual operation of fftshift when it appears in the nested form with FFT?
Date: Tue, 30 Jul 2019 20:06:06 -0500 (CDT)

Hello, 

I try to do the computation consisting of FFTs and some other parts. 
Although FFTs, which may be effectively computed by Octave, are dominant
parts in the computation, 
the cost of other computations, which are not so suitable for Octave or
matlab, are not negligibly small. 
Hence I am trying to implement also by Fortran. 
However, in the case of Fortran, shifting of arrays ("cshift" in fortran)
associated with FFT is very slow (half of total cpu time is used in
cshift!), 
while "fftshift" in octave works well with small costs compared to FFT
itself. 

My question is that, when fftshift appears in the nested form with FFT as 

  Y = fftshift(fft(fftshift(X))),

what is actual operation of fftshift?

Does Octave literally do the shift twice? 
If so, is the scheme very special and elaborate one?
(because standard "cshift" in fortran is very slow in this case)

Or does Octave do the computation
  Y = fftshift(fft(fftshift(X)))
with other methods that actually do not use shifts?

Sincerely yours, 

Masanari HATTORI



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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