crplot                  package:emu                  R Documentation

_F_u_n_c_t_i_o_n _t_o _p_l_o_t _a _d_i_g_i_t_a_l _s_i_n_u_s_o_i_d _a_n_d _t_h_e _c_i_r_c_l_e _f_r_o_m _w_h_i_c_h _i_t _i_s _d_e_r_i_v_e_d.

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

     A digital sinusoid is derived the movement of a point around a
     circle.  The function shows the relationship between the two for
     various parameter settings.

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

     crplot(A = 1, k = 1, p = 0, N = 16, const = NULL, figsize = 8, npoints = 500, col = 1, cplot = TRUE, 
     splot = TRUE, numplot = TRUE, axes = TRUE, incircle = TRUE, arrow = TRUE, linetype = 1, textplot = NULL, 
     lineplot = NULL, ylab = "Amplitude", super = NULL, xaxlab = NULL, type = "b", 
     xlab = "Time (number of points)", fconst = 3.5/3.1, pointconst = 1.2)

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

       A: Amplitude of the circle/sinusoid. 

       k: Frequency of the sinusoid 

       p: Phase of the sinusoid 

       N: Number of points per cycle or revolution. 

   const: A constant corresponding to k + A*cos(2*pi*k+p) 

 figsize: Set the figure size as pin <- c(figsize, figsize/2). Defaults
          to figsize = 8. 

 npoints: The number of points used in plotting the circle. Defaults to
          500 

     col: An integer for the color in plotting the sinusoid and points
          around the circle 

   cplot: Now redundant 

   splot: Now redundant 

 numplot: Logical. If T (defaults), the digital points around the
          circle are numbered 

    axes: Logical. If T, plot axes. 

incircle: Logical. If T, plot an the angle between digital points in
          the circle. 

   arrow: Logical. If T, plot an arrow on incircle showing the
          direction of movement. 

linetype: Specify a linetype. Same function as lty in plot 

textplot: A list containing $radius, $textin, $pivals for plotting text
          at specified angles and radii on the circle. $radius: a
          vector of  amplitudes of the radii at which the text is to be
          plotted; $textin: a vector of chacacter labels to be plotted;
          $pivals: the angle, in radians relative to  zero radians (top
          of the circle) at which the text is to be plotted. Defaults
          to NULL 

lineplot: Plot lines from the centre of the circle to the
          circumference. lineplot is  a vector specifying the angle in
          radians (zero corresponds to the top of the circle) 

    ylab: Specify a y-axis label. 

   super: Superimpose a part solid circle and corresponding sinusoid.
          This needs to be a list containing $first and $last, which
          are values between 0 and 2*pi defining the beginning and
          ending of the part circle which is to be superimposed 

  xaxlab: Now redundant 

    xlab: Specify an x-axis label. 

    type: Specify a type. 

  fconst: A single elment numeric vector for the aspect ratio in a
          postscript plot. Defaults to 3.5/3.1  which is appropriate
          for a postscript setting of  setps(h=4, w=4) 

pointconst: The radius for plotting the numbers around the circle.
          Defaults to 1.2 * A 

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

     Jonathan Harrington

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

     Harrington, J, & Cassidy, S. 1999. Techniques in Speech Acoustics.
     Kluwer

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

     'cr'

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

     crplot()
     # sine wave
     crplot(p=-pi/2)

     crplot(k=3)

     # aliasing
     crplot(k=15)

