Numeric underflow.  Try qr.solve(a)

Allan

On 16/03/11 15:28, Feng Li wrote:
Dear R,

If I have remembered correctly, a square matrix is singular if and only if
its determinant is zero. I am a bit confused by the following code error.
Can someone give me a hint?

a<- matrix(c(1e20,1e2,1e3,1e3),2)
det(a)
[1] 1e+23
solve(a)
Error in solve.default(a) :
   system is computationally singular: reciprocal condition number = 1e-17


Thanks in advance!


Feng


______________________________________________
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.

Reply via email to