HyperMath

Freq

Freq

Previous topic Next topic No expanding text in this topic  

Freq

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Frequency vector generation function.  There are two forms.

Syntax

y = Freq(vec, length)

y = Freq(n, fs)

Argument

Name

Description

 

vec

A vector of time-domain data in ascending order.

 

n

The number of frequency points to generate.  A positive scalar.

 

fs

Sampling frequency in Hz.  A positive scalar.

 

length (optional)

The length of the output vector if specified as a positive integer.  If omitted or zero, the length will be the length of vec.  If the length is specified as ‘pad’, the length will be rounded up (zero padding the inputs) if necessary to obtain a power of 2.

Output

Name

Description

 

y

A vector of the frequency component from the time-domain vector vec, or from the sampling rate.  Unless argument length is specified, its length is equal to the number of elements in vec or n.

Example

Given a vector data of a time-domain signal, a vector is created which is the frequency component of data.

 

Syntax

 

y = Freq(data)

 

Result

 

y is a vector of frequency component of data.

Comments

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 are evenly sampled.

See Also:

BlockFftMag

BlockFrfMag

DftMag

FftMag