#
# Generate some blocks data: 100 observations.
#
x <- runif(100)
y <-make.signal2("blocks",x=x)
#
#find initial interval lengths...
#
I<-intervals(x,"reflect")
l<-lengthintervals(x,I$intervals,neighbours=2,closest=FALSE)
lengths<-l$lengths
#
#perform prediction step...
p<-AdaptNeigh(order(x),x,y,32,5,TRUE,2)
#
#
u<-PointsUpdate(x,p$results[[6]],p$newinfo[[3]],p$newinfo[[4]],5,order(x),p$results[[4]],
lengths,"add")
#
#and here are the updated coefficients...
u$coeff
#
Run the code above in your browser using DataLab