[R] Help in Optimization of a function
ruipbarradas at sapo.pt
Sun Jul 8 12:19:11 CEST 2012
You don't need an optimzation routine to know that the maximum of this
function is +Inf. It's attained at z = 0+ (when z converges to zero by
This breaks the R function optim(), by the way. It
" needs finite values of 'fn' "
Hope this helps,
Em 08-07-2012 10:15, Raghuraman Ramachandran escreveu:
> I have a function f = exp(x^2-y+(1/z))
> Also, x can take values from 1 to 37, y from 2 to 20 and Z from -13 to 51.
> How can I find the maximum of f using any of the optimization functions
> Is there a way to store the possible values of x, y and Z in a single
> variable like in a List or in a multi-dimensional array?
> Thanks for your help
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help