fft - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim

Matlab

 fft
 compute the discrete Fourier transform of a vector in MATLAB(R)

 Calling Sequence fft(X) fft(X, n)

Parameters

 X - MapleMatrix or MatlabMatrix n - (optional) integer

Description

 • 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.

Examples

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

 > $\mathrm{with}\left(\mathrm{Matlab}\right):$
 > $v≔⟨1,2,3,4,3,2,1,2,3,4⟩$
 ${v}{≔}\left[\begin{array}{c}{1}\\ {2}\\ {3}\\ {4}\\ {3}\\ {2}\\ {1}\\ {2}\\ {3}\\ {4}\end{array}\right]$ (1)

The Fourier transform is computed as

 > ${\mathrm{Matlab}}_{\mathrm{fft}}\left(v\right)$

 [                 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

 > ${\mathrm{Matlab}}_{\mathrm{fft}}\left(v,2\right)$

 [3. ] [   ] [-1.]

 See Also