fftreal

Real component of a Fast Fourier Transform (FFT) function.

Syntax

fftreal(vec_expr_1, [,vec_expr_2])

Argument

vec_expr_1
The real component of a vector.
vec_expr_2
An optional parameter that specifies the imaginary component of a vector.

Example

Curve Math Vectors Result
x = freq(c1.x)

y = fftreal(c1.y)

Given c1, a curve is created which is the real component of the FFT of c1.

Comments

The fftreal function returns the real component of a Fast Fourier Transform (FFT). vec_expr_1 and vec_expr_2 are assumed to be evenly sampled. The resultant vector has a number of elements equal to the least power of two greater than or equal to the number of elements in vec_expr_1.

If only one vector expression is passed to fftreal, the function returns a regular FFT.

If two vectors are passed to fftreal, a complex FFT is calculated. vec_expr_1 and vec_expr_2 must have the same number of elements.

The FFT is complex-valued and used to map time-domain data into the frequency domain.