Re: [R] recursive root finding

2008-08-08 Thread baptiste auguie
Any comments? Maybe the problem was not clear or looked too specific. I'll add a more "bare bones" example, if only to simulate discussion: x <- seq(1,10,length=1000) set.seed(11) # so that you get the same randomness y <- jitter(sin(x),a = 0.2) values <- data.frame(x= x, y = y) findZero <-

[R] recursive root finding

2008-08-07 Thread baptiste auguie
Dear list, I've had this problem for a while and I'm looking for a more general and robust technique than I've been able to imagine myself. I need to find N (typically N= 3 to 5) zeros in a function that is not a polynomial in a specified interval. The code below illustrates this, by cre