Last chance! 50% off unlimited learning
Sale ends in
Gives a table of equally sampled points following a sinusoidal function
sinpoint(x, y, delta, x0 = 0, pos = 1, phase = 1.5, nwave = 1,
nint = 50)
the x value of the end of the interval
the y offset (see next parameter)
the difference between the min- and maxima in y
the x value of the beginning of the interval (0 as default)
an integer specifying the kind of vertical offset; should the sinusoidal function be shifted so that y is the first value (pos = 1, is the default), the last value (2),the minimum (3) or the maximum (4) of the function
the phase of the function at x0 in multiples of pi (1.5 as default; begins at its lowest)
number of complete sinuses waves (1 as default)
number of intervals for the sampling (50 as default)
a table of points following a sinusoidal function
# NOT RUN {
res <- sinpoint(c(4,5), 5, 1, x0 = c(0,1), pos = 3)
plot(res$x, res$y)
multilines(res$i, res$x, res$y, col = c("black" ,"red"), type = "o")
# }
Run the code above in your browser using DataLab