You are here : matlab → Signal Processing → enbw
# enbw() - Signal Processing

### Syntax

### Example

### Output / Return Value

### Limitations

### Alternatives / See Also

### Reference

bw = enbw(window) returns the two-sided equivalent noise bandwidth, bw, for a uniformly sampled window, window. The equivalent noise bandwidth is normalized by the noise power per frequency bin.examplebw = enbw(window,fs) returns the two-sided equivalent noise bandwidth, bw, in Hz.

bw = enbw(window) examplebw = enbw(window,fs) example

Equivalent Noise Bandwidth of Hamming WindowOpen This ExampleDetermine the equivalent noise bandwidth of a Hamming window 1000 samples in length.bw = enbw(hamming(1000)) bw = 1.3638 Equivalent Noise Bandwidth of Flat Top WindowOpen This ExampleDetermine the equivalent noise bandwidth in Hz of a flat top window 10000 samples in length. The sample rate is 44.1 kHz.bw = enbw(flattopwin(10000),44.1e3) bw = 16.6285 Equivalent Rectangular Noise BandwidthOpen This Example Obtain the equivalent rectangular noise bandwidth of a Von Hann window and overlay the equivalent rectangular bandwidth on the window's magnitude spectrum. The window is 1000 samples in length and the sampling frequency is 10 kHz. Set the sampling frequency, create the window, and obtain the discrete Fourier transform of the window with 0 frequency in the center of the spectrum.Fs = 10000; win = hann(1000); windft = fftshift(fft(win)); Obtain the equivalent (rectangular) noise bandwidth of the Von Hann window.bw = enbw(hann(1000),Fs) bw = 15.0150 Plot the squared-magnitude DFT of the window and use the equivalent noise bandwidth to overlay the equivalent rectangle.freq = -(Fs/2):Fs/length(win):Fs/2-(Fs/length(win)); maxgain = 20*log10(abs(windft(length(win)/2+1))); plot(freq,20*log10(abs(windft))) hold on plot(bw*[-1 -1 1 1],[-40 maxgain maxgain -40],'--') hold off xlabel('Hz') ylabel('dB') axis([-60 60 -40 60])