You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -49,9 +49,8 @@ The contents of `wsave` must not be changed between calls of `zfftf` or `zfftb`.
49
49
```fortran
50
50
program demo_zffti
51
51
use fftpack, only: zffti
52
-
complex(kind=8) :: x(4)
52
+
complex(kind=8) :: x(4) = [1.0, 2.0, 3.0, 4.0]
53
53
real(kind=8) :: w(31)
54
-
x = [real(kind=8) :: 1.0, 2.0, 3.0, 4.0]
55
54
call zffti(4,w)
56
55
end program demo_zffti
57
56
```
@@ -64,12 +63,9 @@ Computes the forward complex discrete fourier transform (the fourier analysis).
64
63
Equivalently, `zfftf` computes the fourier coefficients of a complex periodic sequence.
65
64
The transform is defined below at output parameter `c`.
66
65
67
-
The transform is not normalized. To obtain a normalized transform
68
-
the output must be divided by `n`. Otherwise a call of `zfftf`
69
-
followed by a call of `zfftb` will multiply the sequence by `n`.
66
+
The transform is not normalized. To obtain a normalized transform the output must be divided by `n`. Otherwise a call of `zfftf` followed by a call of `zfftb` will multiply the sequence by `n`.
70
67
71
-
The array `wsave` which is used by subroutine `zfftf` must be
72
-
initialized by calling subroutine `zffti(n,wsave)`.
68
+
The array `wsave` which is used by subroutine `zfftf` must be initialized by calling subroutine `zffti(n,wsave)`.
73
69
74
70
#### Status
75
71
@@ -89,7 +85,7 @@ Pure function.
89
85
This argument is `intent(in)`.
90
86
The length of the `complex` sequence `c`. The method is more efficient when `n` is the product of small primes.
91
87
92
-
`c`: Shall be a `complex` array.
88
+
`c`: Shall be a `complex`and rank-1 array.
93
89
This argument is `intent(inout)`.
94
90
A `complex` array of length `n` which contains the sequence.
95
91
```
@@ -133,17 +129,13 @@ end program demo_zfftf
133
129
134
130
Unnormalized inverse of `zfftf`.
135
131
136
-
Computes the backward `complex` discrete fourier
137
-
transform (the fourier synthesis). Equivalently, `zfftb` computes
138
-
a `complex` periodic sequence from its fourier coefficients.
132
+
Computes the backward `complex` discrete fourier transform (the fourier synthesis).
133
+
Equivalently, `zfftb` computes a `complex` periodic sequence from its fourier coefficients.
139
134
The transform is defined below at output parameter `c`.
140
135
141
-
The transform is not normalized. to obtain a normalized transform
142
-
the output must be divided by `n`. otherwise a call of `zfftf`
143
-
followed by a call of `zfftb` will multiply the sequence by `n`.
136
+
The transform is not normalized. to obtain a normalized transform the output must be divided by `n`. Otherwise a call of `zfftf` followed by a call of `zfftb` will multiply the sequence by `n`.
144
137
145
-
The array `wsave` which is used by subroutine `zfftf` must be
146
-
initialized by calling subroutine `zffti(n,wsave)`.
138
+
The array `wsave` which is used by subroutine `zfftf` must be initialized by calling subroutine `zffti(n,wsave)`.
147
139
148
140
#### Status
149
141
@@ -219,24 +211,20 @@ Pure function.
219
211
220
212
#### Argument
221
213
222
-
`x`: Shall be a `complex` array.
214
+
`x`: Shall be a `complex`and rank-1 array.
223
215
This argument is `intent(in)`.
224
216
225
217
`n`: Shall be an `integer` scalar.
226
218
This argument is `intent(in)` and `optional`.
227
-
The needed length of the `complex` sequence `c`.
228
-
229
-
##### Warning
230
-
231
-
if `n <= size(x)`, the first `n` elements of `x` will be included in the calculation.
232
-
233
-
if `n > size(x)`, the all elements of `x` and `n-size(x)` elements filled with zeros will be included in the calculation.
219
+
Defines the length of the Fourier transform. If `n` is not specified (the default) then `n = size(x)`. If `n <= size(x)`, `x` is truncated, if `n > size(x)`, `x` is zero-padded.
234
220
235
221
#### Return value
236
222
237
-
`fft(x)` returns the Discrete Fourier Transform (DFT) of `x` using the Fast Fourier Transform (FFT) algorithm.
223
+
Returns a `complex` and rank-1 array, the Discrete Fourier Transform (DFT) of `x`.
238
224
239
-
`fft(x, n)` returns `n` point DFT of `x` using the FFT algorithm.
225
+
#### Notes
226
+
227
+
Within numerical accuracy, `x == ifft(fft(x))/size(x)`.
240
228
241
229
#### Example
242
230
@@ -271,35 +259,23 @@ Pure function.
271
259
272
260
#### Argument
273
261
274
-
`x`: Shall be a `complex` array.
262
+
`x`: Shall be a `complex`and rank-1 array.
275
263
This argument is `intent(in)`.
276
264
277
265
`n`: Shall be an `integer` scalar.
278
266
This argument is `intent(in)` and `optional`.
279
-
The needed length of the `complex` sequence `c`.
280
-
281
-
##### Warning
282
-
283
-
if `n <= size(x)`, the first `n` elements of `x` will be included in the calculation.
284
-
285
-
if `n > size(x)`, the all elements of `x` and `n-size(x)` elements filled with zeros will be included in the calculation.
267
+
Defines the length of the Fourier transform. If `n` is not specified (the default) then `n = size(x)`. If `n <= size(x)`, `x` is truncated, if `n > size(x)`, `x` is zero-padded.
286
268
287
269
#### Return value
288
270
289
-
`ifft(x)` returns the inverse Discrete Fourier transform of `x` using the Fast Fourier Transform algorithm..
290
-
291
-
`ifft(x, n)` returns `n` point inverse DFT of `x` using the FFT algorithm.
271
+
Returns a `complex` and rank-1 array, the unnormalized inverse Discrete Fourier Transform (DFT) of `x`.
@@ -335,9 +311,8 @@ The length of the sequence to be transformed.
335
311
`wsave`: Shall be a `real` array.
336
312
This argument is `intent(out)`.
337
313
A work array which must be dimensioned at least `2*n+15`.
338
-
The same work array can be used for both `dfftf` and `dfftb`
339
-
as long as `n` remains unchanged. Different `wsave` arrays
340
-
are required for different values of `n`.
314
+
The same work array can be used for both `dfftf` and `dfftb` as long as `n` remains unchanged.
315
+
Different `wsave` arrays are required for different values of `n`.
341
316
342
317
##### Warning
343
318
@@ -358,16 +333,12 @@ end program demo_dffti
358
333
359
334
#### Description
360
335
361
-
Computes the fourier coefficients of a real
362
-
perodic sequence (fourier analysis). The transform is defined
363
-
below at output parameter `r`.
336
+
Computes the fourier coefficients of a real perodic sequence (fourier analysis).
337
+
The transform is defined below at output parameter `r`.
364
338
365
-
The transform is not normalized. To obtain a normalized transform
366
-
the output must be divided by `n`. Otherwise a call of `dfftf`
367
-
followed by a call of `dfftb` will multiply the sequence by `n`.
339
+
The transform is not normalized. To obtain a normalized transform the output must be divided by `n`. Otherwise a call of `dfftf` followed by a call of `dfftb` will multiply the sequence by `n`.
368
340
369
-
The array `wsave` which is used by subroutine `dfftf` must be
370
-
initialized by calling subroutine `dffti(n,wsave)`.
341
+
The array `wsave` which is used by subroutine `dfftf` must be initialized by calling subroutine `dffti(n,wsave)`.
371
342
372
343
#### Status
373
344
@@ -430,7 +401,7 @@ The contents of `wsave` must not be changed between calls of `dfftf` or `dfftb`.
transform (the fourier synthesis). Equivalently, `dfftb` computes
448
-
a `real` periodic sequence from its fourier coefficients.
417
+
Computes the backward `real` discrete fourier transform (the fourier synthesis).
418
+
Equivalently, `dfftb` computes a `real` periodic sequence from its fourier coefficients.
449
419
The transform is defined below at output parameter `c`.
450
420
451
-
The transform is not normalized. to obtain a normalized transform
452
-
the output must be divided by `n`. otherwise a call of `dfftf`
453
-
followed by a call of `dfftb` will multiply the sequence by `n`.
421
+
The transform is not normalized. To obtain a normalized transform the output must be divided by `n`. Otherwise a call of `dfftf` followed by a call of `dfftb` will multiply the sequence by `n`.
454
422
455
-
The array `wsave` which is used by subroutine `dfftf` must be
456
-
initialized by calling subroutine `dffti(n,wsave)`.
423
+
The array `wsave` which is used by subroutine `dfftf` must be initialized by calling subroutine `dffti(n,wsave)`.
457
424
458
425
#### Status
459
426
@@ -548,16 +515,8 @@ Defines the length of the Fourier transform. If `n` is not specified (the defaul
548
515
549
516
#### Return value
550
517
551
-
The returned real array contains:
552
-
```
553
-
[y(1),Re(y(2)),Im(y(2)),...,Re(y(n/2+1))] if n is even
554
-
[y(1),Re(y(2)),Im(y(2)),...,Re(y(n/2+1)),Im(y(n/2+1))] if n is odd
Rearranges the Fourier transform with zero frequency shifting back to the original transform output. In other words, `ifftshift` is the result of undoing `fftshift`.
0 commit comments