Windowing functions          package:signal          R Documentation

_W_i_n_d_o_w_i_n_g _f_u_n_c_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     A variety of generally Matlab/Octave compatible filter generation
     functions, including Bartlett, Blackman, Hamming, Hanning, and
     triangular.

_U_s_a_g_e:

     bartlett(n) 
     blackman(n) 
     boxcar(n) 
     flattopwin(n, sym = c('symmetric', 'periodic')) 
     gausswin(n, w = 2.5) 
     hamming(n) 
     hanning(n) 
     triang(n)

_A_r_g_u_m_e_n_t_s:

       n: length of the filter; number of coefficients to generate. 

       w: the reciprocal of the standard deviation for 'gausswin'. Use
          larger 'a' for a narrower window. 

     sym: 'symmetric' for a symmetric window, 'periodic' for a periodic
          window. 

_D_e_t_a_i_l_s:

     'triang', unlike the bartlett window, does not go to zero at the
     edges of the window.  For odd 'n', 'triang(n)' is equal to
     'bartlett(n+2)' except for the zeros at the edges of the window.

     A main use of 'flattopwin' is for calibration, due to its
     negligible amplitude errors. This window has low pass-band ripple,
     but high bandwidth.

_V_a_l_u_e:

     Filter coefficients.

_A_u_t_h_o_r(_s):

     Original Octave versions by Paul Kienzle ('boxcar', 'gausswin',
     'triang') and Andreas Weingessel ('bartlett', 'blackman',
     'hamming', 'hanning'). Conversion to R by Tom Short.

_R_e_f_e_r_e_n_c_e_s:

     Oppenheim, A.V., and R.W. Schafer, "Discrete-Time Signal
     Processing", Upper Saddle River, NJ: Prentice-Hall, 1999.

     Gade, S; Herlufsen, H; (1987) "Use of weighting functions in
     DFT/FFT analysis (Part I)", Bruel & Kjaer Technical Review No. 3.

     <URL: http://en.wikipedia.org/wiki/Windowed_frame>

     Octave Forge <URL: http://octave.sf.net>

_S_e_e _A_l_s_o:

     'filter', 'fftfilt', 'filtfilt', 'fir1'

_E_x_a_m_p_l_e_s:

     n = 51
     op = par(mfrow=c(3,3))
     plot(bartlett(n), type = "l", ylim = c(0,1))
     plot(blackman(n), type = "l", ylim = c(0,1))
     plot(boxcar(n), type = "l", ylim = c(0,1))
     plot(flattopwin(n), type = "l", ylim = c(0,1))
     plot(gausswin(n, 5), type = "l", ylim = c(0,1))
     plot(hanning(n), type = "l", ylim = c(0,1))
     plot(hamming(n), type = "l", ylim = c(0,1))
     plot(triang(n), type = "l", ylim = c(0,1))
     par(op)

