numeric
::invfft
Inverse Fast Fourier Transform
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
numeric::invfft(L
, <mode
>, <ReturnType = t
>, <Clean
>) numeric::invfft(M
, <mode
>, <ReturnType = t
>, <Clean
>) numeric::invfft(A
, <mode
>, <ReturnType = t
>, <Clean
>)
numeric::invfft(data)
returns the inverse
discrete Fourier transform.
The onedimensional inverse discrete Fourier transform L = invfft(F) of N data elements F_{k} stored in the list F = [F_{1}, …, F_{N}] is the list L = [L_{1}, …, L_{N}] given by
.
invfft
transforms the data by a Fast Fourier
Transform (FFT) algorithm.
The ddimensional inverse discrete Fourier transform A = invfft(F) is given by
with j_{1} = 1, …, n_{1}, …, j_{d} = 1, …, n_{d}.
Data provided by a list, or onedimensional array
, or hfarray
are transformed according to
the onedimensional transform. Data provided by matrices are transformed
according to the twodimensional transform. Data provided by multidimensional
arrays or hfarrays are transformed according to the multidimensional
transform matching the format of the input array.
If the data size N factorizes as N = p q,
the inverse discrete Fourier transform can be computed by p different
inverse Fourier transforms of subsets of the data, each subset having
the data size q.
The corresponding 'divide and conquer' algorithm is known as FFT ('Fast
Fourier Transform'). The invfft
routine employs
the FFT algorithm. It is most efficient, when the data size N is
an integer power of 2 ('radix
2 FFT'). In this case, the algorithm needs elementary
operations.
More generally, FFT is efficient, if the data size is the product of many small factors.
Following Bluestein, the inverse Fourier transform is written as a convolution if the data size N is a prime. The data are zeropadded to a data length that is an integer power of 2. The convolution is then computed via radix 2 FFTs. Thus, the algorithm needs elementary operations even if N is a prime.
Without the option Symbolic
, the function
is sensitive to the environment variable DIGITS
, which determines
the numerical working precision.
Compute onedimensional transformations using lists. By default, numerical expressions are converted to floatingpoint values:
L := [1, 2^(1/2), 3*I, PI]: F := numeric::fft(L)
numeric::invfft(F)
numeric::invfft(F, Clean)
To use exact arithmetic, specify the option Symbolic
:
F := numeric::fft(L, Symbolic)
numeric::invfft(F, Symbolic)
numeric::invfft
accepts symbolic expressions.
Internally, the default method HardwareFloats
(with DIGITS
< 16
) fails because of the symbolic parameter x
.
The following results are computed with the software arithmetic provided
by the MuPAD^{®} kernel:
L := [x, 2, 3, x]: numeric::fft(L)
numeric::invfft(F)
numeric::fft(L, Symbolic)
numeric::invfft(F, Symbolic)
delete L, F:
Compute the following twodimensional transformation using an array with two indices:
A := array(1..2, 1..4, [[1, 2, 3, 4], [a, b, c, d]]): F := numeric::fft(A, Symbolic)
numeric::invfft(F, Symbolic)
delete A, F
Data of arbitrary length can be transformed:
L := [1, 2 + I, PI/3]: numeric::fft(L)
delete L

A list, or a onedimensional array( 

A 

A ddimensional 

One of the flags 

With With Compared to the If no If the result cannot be computed with hardware floatingpoint values, software arithmetic by the MuPAD kernel is tried. If the current value of There can be several reasons for hardware arithmetic to fail:
If neither If Note that With The trailing digits in floatingpoint results computed with 

This option prevents conversion of the input data to floatingpoint values. Without this option, the floatingpoint converter 

Option, specified as Return the result in a container of domain type This option determines the domain type If no return type is specified by this option, the result if of the same type and format as the input data. If the return type With 

Reduce roundoff garbage in the result. All entries of the result
with absolute values smaller than NoteThe postprocessing of the result is done on the software level. When using hardware floatingpoint values, this option can increase the runtime significantly. This option is ignored when used in conjunction with the option 
List, array, hfarray, or matrix of the same length and format
as the first input parameter L
, A
,
or M
, respectively. The type of the return value
can be changed with the option ReturnType
.