fft()
Performs the discrete Fourier transform
Syntax
y = fft(x, length)
Arguments
| Name | Description | Range | Type | Required |
|---|---|---|---|---|
| x | data to be transformed | (-∞, ∞) | integer, real, complex | yes |
| length | length of the transform | [1, ∞) | integer | yes |
Examples
fft([1, 1, 1, 1])
returns [4+0i, 0+0i]
fft([1, 0, 0, 0]
returns [1+0i, 1+0i]
fft(1, 4)
returns [1+0i, 1+0i]
Defined in
Built in
See Also
Notes/Equations
The fft() function uses a high-speed radix-2 fast Fourier transform when the length of x is a power of two. fft(x, n) performs an n-point discrete Fourier transform, truncating x if length(x) > n and padding x with zeros if length(x) < n.
fft() uses a real transform if x is real and a complex transform if x is complex. If the length of x is not a power of two, then a mixed radix algorithm based on the prime factors of the length of x is used.
The fft() function is designed to work with uniformly spaced waveforms. If a non-uniform waveform is input, then the output spectrum will be incorrect. For non-uniformly spaced data, use the fs() function.
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()