On Sat, Jul 11, 2009 at 6:24 AM, milton ruser<milton.ru...@gmail.com> wrote:
> my.values<-myfunction(1,10,100) > min(my.values) > max(my.values) That finds the minimum and maximum of a limited sample from a univariate function. Extending this method to ten dimensions might be a bit tricky... If you want to find the min or max of a function to a higher resolution or of higher dimensionality then you need an optimisation algorithm. In R, see help(optim), help(optimise) and help(nlminb). Which one to use will depend on your function and parameter constraints. Barry ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.