gen.signal | R Documentation |
Simulate different types of signal
gen.signal(l, h, jump, b1, rep, shift)
l |
length of data, if data is periodic then the length of period |
h |
numerical vector of change-point locations |
jump |
numerical vector of jump height at change-point locations |
b1 |
numerical vector of piecewise slopes |
rep |
number of periods if data is periodic, default is 1 |
shift |
numerical vector of vertical shifts for each period, default is 0 |
a vector of simulated signal
l = 1200
h = seq(150,by=150,length.out=6)
jump = rep(0,7)
beta1 = c(2,-1,2.5,-3,-0.2,2.5)/50
beta1 = c(beta1,-sum(beta1*(c(h[1],diff(h))))/(l-tail(h,1)))
signal = gen.signal(l,h,jump,beta1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.