plafit                  package:emu                  R Documentation

_C_a_l_c_u_l_a_t_e _t_h_e _c_o_e_f_f_i_c_i_e_n_t_s _o_f _a _p_a_r_a_b_o_l_a

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

     Fit a second ordered polynomial to a vector of values

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

     plafit(wav, fit = FALSE, n = 101)

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

     wav: a vector or single column matrix of numeric values to which
          the 2nd order polynomial is to be fitted. 

     fit: if F, return the coefficients of the polynomial; if T, the
          values of the polynomial are returned to the same length as
          the vector wav. 

       n: in fitting the polynomial, linear time normalisation is first
          applied to the input vector wav to 101 points. The polynomial
          is fitted under the assumption that these points extend
          linearly in time between t = -1 and t = 1 with t = 0
          occurring at the temporal midpoint. 

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

     The function fits a parabola (2nd order polynomial) following the
     method of van Bergem, Speech Communication, 14, 1994, 143-162. The
     algorithm fixes the parabola at the onset, midpoint, and offset of
     the vector i.e. such htat the fitted parabola and original vector
     have the same values at these points.

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

     The function returns the coefficients of c0, c1, c2 in the
     parabola  y = c0 + c1t + c2t^2 where t extends between -1 and 1.
     The function can also be used to derive the values  of the
     parabola as a function of time from the coefficients.

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

     Jonathan Harrington

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

     'dct'

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

     # fit a polynomial to a segment of fundamental frequency data
     plafit(vowlax.fund[1,]$data)

     # return the fitted values of the polynomial
     plafit(vowlax.fund[1,]$data, fit=TRUE)

