pub fn fft(input: Vec<f32>) -> (Vec<f32>, Vec<f32>)
Expand description
Computes the Fast Fourier Transform (FFT) of the given input vector.
This function takes a vector of real numbers as input and returns a tuple containing two vectors: the real and imaginary parts of the FFT result.
§Parameters
input
: A vector off32
representing the input signal in the time domain.
§Returns
A tuple containing two vectors:
- A vector of
f32
representing the real part of the FFT output. - A vector of
f32
representing the imaginary part of the FFT output.
§Example
let input = vec![0.0, 1.0, 0.0, 0.0];
let (real, imag) = fft(input);