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