Frequency vector function.




A valid vector expression.


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

y = fftmag(c1.y)

A vector, which is the frequency component for a frequency-domain curve, is created.


The freq function builds a frequency vector from time-domain data. 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 the argument. The resultant vector contains values that range from zero to twice the Nyquist frequency, and is suitable as a frequency axis companion for any of the frequency domain functions. freq assumes the elements of vec_expr are evenly sampled.

The freq function can also convert a vector of frequencies to a vector of times. The reason is that freq takes the reciprocal of the input spacing and divides by the length. Performing this twice effectively reverses the process. The reversal is a true inverse operation if c1.x(0)=0 and length(c1.x) is a power of 2.