help-octave
[Top][All Lists]
Advanced

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

Re: set of linear equations ax = b


From: Keith Goodman
Subject: Re: set of linear equations ax = b
Date: Mon, 6 Jun 2005 10:01:48 -0700

On 6/6/05, Csanyi Pal <address@hidden> wrote:
> I have the following set of linear equations:
> 2x - y + 3z = 6
> -4x + 2y -z = -7
> 2x + y + 5z = 6
> 
> I made the matrixes:
> A = [2, -1, 3; -4, 2, -1; 2, 1, 5]
> B = [6,-7,6]
> 
> and then, to solve the set of linear equations, do:
> A \ B
> 
> but get the error:
> error: operator \: nonconformant arguments (op1 is 3x3, op2 is 1x3)
> error: evaluating binary operator `\' near line 16, column 3
> 
> or
> inv (A) * B
> 
> and get the error:
> error: operator *: nonconformant arguments (op1 is 3x3, op2 is 1x3)
> error: evaluating binary operator `*' near line 16, column 9
> 
> So what's wrong? Thanks!

>> A\B'
ans =

   1
  -1
   1



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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