[R] noisy quantisation
William Simpson
william.a.simpson at gmail.com
Tue May 5 13:04:52 CEST 2009
If this helps, here is what I have currently
mean.p<- .5
contrast<-1
amp<- contrast*mean.p
freq<- 3
n<- 100
p<-amp*cos(2*pi*freq*(1:n)/n ) + mean.p
plot(p)
dens<-as.numeric(runif(1:n)<p)
plot(p, type="l")
points(dens, col="red")
I would like some dots having y-value=0.5 in the middle of the plot.
These will reduce the error of approximation.
Thanks for any help.
Bill
More information about the R-help
mailing list