HyperMath

FftMag

FftMag

Previous topic Next topic No expanding text in this topic  

FftMag

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

Magnitude of a Fast Fourier Transform (FFT) function.

Note: This item is deprecated and will be removed in a future release.

Syntax

y = FftMag(vec1, vec2, scale)

Arguments

Name

Description

 

vec1

A vector of the real component of time-domain data.

 

vec2

(Optional)

A vector of the imaginary component of time-domain data.  The vector is of type real.

 

scale (optional)

Set to "norm" to divide the output by the number of points in vec1. The default is "none."

Output

Name

Description

 

y

A vector of the the magnitudes of the FFT.  Its length equals to the least power of two greater than or equal to the number of elements in vec1.

Example

Given a vector data of real part of a time-domain signal, a vector of the magnitudes of the FFT of the signal is created.

 

Syntax

 

y = FftMag(data)

 

Result

 

y is a vector of the magnitudes of the FFT of data.  Its length equals to the least power of two greater than or equal to the number of elements in data.

Comments

The FftMag function returns the magnitude of a Fast Fourier Transform (FFT). vec1 and vec2 are assumed to be evenly sampled.

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

If two vectors are passed to FftMag, a complex FFT is calculated. vec1 and vec2 must have the same number of elements.

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

See Also:

FftImag

FftPhase

FftReal

Freq

Ifft