generate_window

Function generate_window 

Source
pub fn generate_window(
    window_type: &str,
    length: usize,
    periodic: bool,
) -> Result<Vec<f64>, String>
Expand description

Create window functions of various types.

§Arguments

  • window_type - Type of window function (“hamming”, “hanning”, “blackman”, etc.)
  • length - Length of the window
  • periodic - Whether the window should be periodic (default: false)

§Returns

  • Window function values as a vector

§Errors

Returns an error if the window length is zero or if the window type is unknown.