Programmer Guide/Command Reference/EVAL/fft: Difference between revisions

From STX Wiki
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 [[../npow2|npow2(nrow(''x''))]]
;Result:A matrix ''y'' with [[../ncol|ncol(''x'')]] columns and L+2 rows, where each column ''y''[*,j] contains the complex spectrum of the column (channel) ''x''[*,i]. The transformation length L is set to [[../npow2|npow2(nrow(''x''))]].
// (1) fft( X )
----
// function:
;Usage 2:<code>fft(<var>x</var>, <var>n</var> {, <var>ytype</var>, <var>poffset</var>, <var>prange</var>, <var>aref</var>})</code>
// if X is a vector: compute the fft spectrum of X
:;<var>x</var>: signal vector or matrix; if ''x'' is a matrix a spectrum of each column is computed
// if X is a matrix: compute the fft spectrum of each row of X
:;<var>n</var>: desired length of analysis window;
// the fft length L is set to the next power of 2 of nrow(X)
::*If <code>''n'' < nrow(''x'')</code>, the analysis window length L is set to nrow(''x''), otherwise L is set to ''n''.
// if L is greater than nrow(X), zero padding is applied
::*If the analysis window length L is a power of 2 (L=2^M), the '''fft''' algorithm is used, otherwise the '''dft''' is used.
// result:  
// vector or matrix Y containing one complex spectrum per row;
// nrow(Y) = L+2, ncol(Y) = ncol(X)


=====fft=====
{|
|-
|fft(x)fft(<var>x</var>, <var>n</var>)
|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]]
;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>]]
[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]]

Revision as of 11:51, 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 y with ncol(x) columns and L+2 rows, where each column y[*,j] contains the complex spectrum of the column (channel) x[*,i]. The transformation length L is set to npow2(nrow(x)).

Usage 2
fft(x, n {, ytype, poffset, prange, aref})
x
signal vector or matrix; if x is a matrix a spectrum of each column is computed
n
desired length of analysis window;
  • If n < nrow(x), the analysis window length L is set to nrow(x), otherwise L is set to n.
  • If the analysis window length L is a power of 2 (L=2^M), the fft algorithm is used, otherwise the dft is used.


See also
ifft, dft, dct, cepstrum, lpc

<function list>

Navigation menu

Personal tools