pub fn create_window(
windowtype: WindowType,
length: usize,
) -> FFTResult<Vec<f64>>
Expand description
Creates a window function of the specified type and length
§Arguments
window_type
- The type of window to createlength
- The length of the window
§Returns
A vector containing the window values
§Examples
use scirs2_fft::fft::windowing::{create_window, WindowType};
// Create a Hann window of length 10
let window = create_window(WindowType::Hann, 10).unwrap();
assert_eq!(window.len(), 10);
assert!(window[0] < 0.01); // Near zero at the edges
assert!(window[5] > 0.9); // Near one in the middle