Matlab
fft
compute the discrete Fourier transform of a vector in MATLAB(R)
Calling Sequence
Parameters
Description
Examples
fft(X)
fft(X, n)
X
-
MapleMatrix or MatlabMatrix
n
(optional) integer
The fft command uses MATLAB® to compute the discrete Fourier transform of a vector, X.
If the optional parameter n is specified, then only the first n elements of vector X are used in the computation. If X has fewer than n elements, the missing elements are replaced with zeros (that is, X is padded with zeros up to the value of n).
Executing the fft command returns a Vector.
To see the result of the MATLAB® calls, copy the examples to a worksheet and execute them. For help setting up MATLAB® to work with Maple, see Matlab[setup].
Define the Maple matrix
with⁡Matlab:
v≔1,2,3,4,3,2,1,2,3,4
v≔1234321234
The Fourier transform is computed as
Matlabfft⁡v
[ 25. + 0. I ]
[ ]
[0.618033988749894901 - 1.90211303259030706 I ]
[-3.61803398874989490 + 4.97979656976556040 I ]
[-1.61803398874989490 + 1.17557050458494626 I ]
[-1.38196601125010509 + 0.449027976579585484 I]
[ -3. + 0. I ]
[-1.38196601125010509 - 0.449027976579585484 I]
[-1.61803398874989490 - 1.17557050458494626 I ]
[-3.61803398874989490 - 4.97979656976556040 I ]
[0.618033988749894901 + 1.90211303259030706 I ]
To obtain the fft of only the first two elements of v
Matlabfft⁡v,2
[3. ]
[-1.]
See Also
DiscreteTransforms[FourierTransform]
Matlab[det]
Matlab[evalM]
Matlab[inv]
MatlabMatrix
Download Help Document