help-octave
[Top][All Lists]
Advanced

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

Re: Problem With Solving Matrix Equations


From: Keith Goodman
Subject: Re: Problem With Solving Matrix Equations
Date: Wed, 10 May 2006 12:18:35 -0700

On 5/10/06, MoneyHaus <address@hidden> wrote:

The problem I am having with Octave seems rather elementary, but I can't seem
to get my head around it. Solving linear equations using the "\" operator,
such as x=A\B, just won't ever work for me.

For example, the following should solve easily, yet my Octave installation
(latest) won't:

octave:17> A=[0,2,0,1;2,2,3,2;4,-3,0,1.;6,1,-6,-5];
octave:18> B=[0;-2;-7;6];
octave:19> inv(A)*B
ans =

  -0.50000
   1.00000
   0.33333
  -2.00000

octave:20> A\B
warning: matrix singular to machine precision, rcond = nan
warning: attempting to find minimum norm solution

And there it stops... it'll just sit there and never solve before. I'm
pretty sure I shouldn't be getting those warning messages to being with.

It works for me:

A\B
ans =

 -0.50000
  1.00000
  0.33333
 -2.00000



reply via email to

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