pub fn enbw(window: Window, n: usize) -> FFTResult<f64>
Expand description
Compute the equivalent noise bandwidth of a window
§Arguments
window
- Window functionn
- Window length
§Returns
The equivalent noise bandwidth of the window.
§Examples
use scirs2_fft::window::{Window, enbw};
use approx::assert_relative_eq;
let bandwidth = enbw(Window::Hann, 1024).unwrap();
assert_relative_eq!(bandwidth, 1.5, epsilon = 0.01);
§Errors
Returns an error if the window calculation fails.