[R] Solve system of equations (nleqslv) only returns origin

Berend Hasselman bhh at xs4all.nl
Tue Dec 4 18:59:52 CET 2012


On 04-12-2012, at 18:50, Berend Hasselman wrote:

> 
> 
> You should return the vector y i.e. function values.
> But y has length 4 and x has length 4.
> 

x has length 5 of course.

Berend

> So where is the fifth value for y?
> 
>>   }
>> 
>> Xstart=c(10000, 200, 0.5, 0.5, 12)
>> fstart= firstordercond(Xstart)
>> 
> 
> If you print fstart you will see that it is identical to Xstart.
> 
> You need to rethink you firstordercond() function.
> It's not correct.
> 
> Berend
> 
>> nleqslv(Xstart, firstordercond)
>> 
>> 
>> 
>> -- 
>> Alicia Ellis
>> Postdoc
>> Gund Institute for Ecological Economics
>> University of Vermont
>> 617 Main Street
>> Burlington, VT  05405
>> (802) 656-1046
>> http://www.uvm.edu/~aellis5/
>> <http://entomology.ucdavis.edu/faculty/scott/aellis/>
>> 
>> 	[[alternative HTML version deleted]]
>> 
>> ______________________________________________
>> R-help at 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.
> 
> ______________________________________________
> R-help at 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.




More information about the R-help mailing list