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.
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
)
Amplitude of the circle/sinusoid.
Frequency of the sinusoid
Phase of the sinusoid
Number of points per cycle or revolution.
A constant corresponding to k + A*cos(2*pi*k+p)
Set the figure size as pin <- c(figsize, figsize/2). Defaults to figsize = 8.
The number of points used in plotting the circle. Defaults to 500
An integer for the color in plotting the sinusoid and points around the circle
Now redundant
Now redundant
Logical. If TRUE (defaults), the digital points around the circle are numbered
Logical. If TRUE, plot axes.
Logical. If TRUE, plot an the angle between digital points in the circle.
Logical. If TRUE, plot an arrow on incircle showing the direction of movement.
Specify a linetype. Same function as lty in plot
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 character 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
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)
Specify a y-axis label.
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
Now redundant
Specify a type.
Specify an x-axis label.
A single element 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)
The radius for plotting the numbers around the circle. Defaults to 1.2 * A
Jonathan Harrington
Harrington, J, & Cassidy, S. 1999. Techniques in Speech Acoustics. Kluwer
cr
crplot()
# sine wave
crplot(p=-pi/2)
crplot(k=3)
# aliasing
crplot(k=15)
Run the code above in your browser using DataLab