Description Usage Arguments Details Value Note Author(s) Examples
This function computes signal function values based on a grid input.
1 | make.signal2(name, x, snr = Inf, ...)
|
name |
a character string of the test signal to create. |
x |
a vector of gridpoints. |
snr |
optional argument to scale the function values according to a signal-to-noise ratio. |
... |
any additional arguments. |
This function is based on the make.signal
function included in the S-Plus wavelets module, except that the x vector can be irregular. As well as the signals included for the original version (e.g. the Donoho/Johnstone test signals), a piecewise polynomial can be sampled.
z |
the signal function values. |
The test signals have domain [0,1], so the grid vector x must have values within this interval.
Matt Nunes (nunesrpackages@gmail.com), Marina Knight
1 2 3 4 5 6 7 8 9 10 11 | #create grid vector
#
xgrid<-rnorm(50)
xgrid
#
pp<-make.signal2("ppoly",x=xgrid)
#
#piecewise polynomial data vector
#
plot(sort(xgrid),pp[order(xgrid)],type="l")
#
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.