There was an error with the parentheses. Here it is corrected: optim(c(1,1), function(x) (exp(x[1])-x[2])^2 + log(x[2])^2)
On 3/24/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Minimize the sum of the squares of the differences between the > two sides: > > optim(c(1,1), function(x) exp(x[1]-x[2])^2 + log(x[2])^2) > > > On 3/24/06, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > hi all > > > > i have been searching through the archives in search for some help and it > > seems > > to have been fruitless - thus the mail. i saw some mail relating to > > mathomatic > > and maxima. mathomatic only works for simpel functions - as per the mail and > > does not support logs ...- and i am not familiar with maxima. i would > > preferably want to use an R function. > > > > > > > > is there a function that can solve a system of non linear equations. i dont > > have > > any data - ie as per nls. > > > > > > > > so a trivial example would be: > > > > exp(a) = v > > log(v) = 0 > > > > > > > > and we need to solve for v and a. > > > > hoping someone can help. > > / > > allan > > > > ______________________________________________ > > [email protected] mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! > > http://www.R-project.org/posting-guide.html > > > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
