octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61246] matrix inversions give wrong results (


From: Joohwa Lee
Subject: [Octave-bug-tracker] [bug #61246] matrix inversions give wrong results (inv, lu, mldivide)
Date: Thu, 30 Sep 2021 01:09:56 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36 Edg/94.0.992.31

Follow-up Comment #1, bug #61246 (project octave):

I tried to solve matrix system equations with several methods, i.e., inv,
mldivide, lu. They all give wrong results

n = 7;
a = randn(n);
x = (1:n)';
b = a * x;
r = x - a\b;

The last line can be changed to r = x - inv(a)*b;
The results should be all zeros. However, they are not zeros.
When n = 6 (or less), the code gives correct answers.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61246>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]