[R] solve the quadratic equation ax^2+bx+c=0

Christoph Buser buser at stat.math.ethz.ch
Mon Nov 7 18:34:22 CET 2005


Hi

Have a look at ?polyroot. This might be helpful.

Regards,

Christoph Buser

--------------------------------------------------------------
Christoph Buser <buser at stat.math.ethz.ch>
Seminar fuer Statistik, LEO C13
ETH (Federal Inst. Technology)	8092 Zurich	 SWITZERLAND
phone: x-41-44-632-4673		fax: 632-1228
http://stat.ethz.ch/~buser/
--------------------------------------------------------------


Yuying Shi writes:
 > If I have matrics as follows:
 > > a <- c(1,1,0,0)
 > > b <- c(4,4,0,0)
 > > c <- c(3,5,5,6)
 > How can I use R code to solve the equation ax^2+bx+c=0.
 > thanks!
 >  yuying shi
 > 
 > 	[[alternative HTML version deleted]]
 > 
 > ______________________________________________
 > R-help at stat.math.ethz.ch mailing list
 > https://stat.ethz.ch/mailman/listinfo/r-help
 > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list