Programmer Guide/Command Reference/EVAL/fft: Difference between revisions
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
;Usage 1:<code>fft(<var>x</var>)</code> | ;Usage 1:<code>fft(<var>x</var>)</code> | ||
:;<var>x</var>: signal vector or matrix; if ''x'' is a matrix a spectrum of each column is computed | :;<var>x</var>: signal vector or matrix; if ''x'' is a matrix a spectrum of each column is computed | ||
;Result:A matrix containing a complex spectrum for each column (channel) of the input signal ''x''. The transformation length L is set to <code>[[./npow2|npow2(nrow( | ;Result:A matrix containing a complex spectrum for each column (channel) of the input signal ''x''. The transformation length L is set to <code>[[./npow2|npow2(nrow(''x''))]] | ||
// (1) fft( X ) | // (1) fft( X ) | ||
// function: | // function: | ||
Line 24: | Line 24: | ||
|Calculate the FFT of the vector x. If the parameter <var>n</var> is given and <var>n</var> >= nrow(<var>x</var>), then <var>n</var> is used as the signal length. The next possible value of <var>x</var>^2 is used for the FFT length (if necessary, 0 samples are added to <var>x</var>). The result is a complex FFT spectrum with 2^(m-1)+1 complex values (2^m = FFT length) | |Calculate the FFT of the vector x. If the parameter <var>n</var> is given and <var>n</var> >= nrow(<var>x</var>), then <var>n</var> is used as the signal length. The next possible value of <var>x</var>^2 is used for the FFT length (if necessary, 0 samples are added to <var>x</var>). The result is a complex FFT spectrum with 2^(m-1)+1 complex values (2^m = FFT length) | ||
|} | |} | ||
;See also: [[Programmer_Guide/Command_Reference/EVAL/ifft|ifft]], [[Programmer_Guide/Command_Reference/EVAL/dft|dft]], [[Programmer_Guide/Command_Reference/EVAL/dct|dct]], [[Programmer_Guide/Command_Reference/EVAL/cepstrum|cepstrum]], [[Programmer_Guide/Command_Reference/EVAL/lpc|lpc]] | |||
[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]] |
Revision as of 10:36, 12 April 2011
Fast fourier transform.
- Usage 1
fft(x)
- x
- signal vector or matrix; if x is a matrix a spectrum of each column is computed
- Result
- A matrix containing a complex spectrum for each column (channel) of the input signal x. The transformation length L is set to
[[./npow2|npow2(nrow(x))]]
// (1) fft( X )
// function:
// if X is a vector: compute the fft spectrum of X
// if X is a matrix: compute the fft spectrum of each row of X
// the fft length L is set to the next power of 2 of nrow(X)
// if L is greater than nrow(X), zero padding is applied
// result:
// vector or matrix Y containing one complex spectrum per row;
// nrow(Y) = L+2, ncol(Y) = ncol(X)
fft
fft(x)fft(x, n)
Calculate the FFT of the vector x. If the parameter n is given and n >= nrow(x), then n is used as the signal length. The next possible value of x^2 is used for the FFT length (if necessary, 0 samples are added to x). The result is a complex FFT spectrum with 2^(m-1)+1 complex values (2^m = FFT length)