[Fwd: RE: Calculation error by JAMA]


Sender: "Cleve Moler" <Cleve.Moler@mathworks.com>
Subject: RE: Calculation error by JAMA


The result is correct.  What do you expect?
  -- Cleve

-----Original Message-----
From: jama@nist.gov [mailto:jama@nist.gov] On Behalf Of Jewian Huang
Sent: Thursday, March 27, 2008 9:43 AM
To: Multiple recipients of list
Subject: Gcalculation error by JAMA

Hi there,

Please see my following codes:

double[][] A = {{1.},{1.},{1.},{1.},{1.},{1.}};
double[][] B = {{2.},{2.},{2.},{4.},{4.},{4.}};
Matrix a = new Matrix(A);
Matrix b = new Matrix(B);
double[][] c = a.solve(b).getArray();

I got the result of c is: {{3.000000000000001}}. Obviousely the result
is wrong.
Do you know why and how I can solve this problem?

Thanks very much.

Regards,
Jewian











Date Index | Thread Index | Problems or questions? Contact list-master@nist.gov