[Top][All Lists]

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

Re: Nonconformant \ behaviour

From: Johan Kullstam
Subject: Re: Nonconformant \ behaviour
Date: 29 Jan 2001 08:44:19 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

"Richard Gould" <address@hidden> writes:

> In matlab, the command sequence:
> A=[1,2,3,4];
> b=[1];
> x=A\b
> gives x=[0;0;0;0.2500]
> Whilst in octave, this produces the message:
> "error: operator \: nonconformant arguments (op1 is 1x4, op2 is 1x1)"

> Is there a way of working around this apparent discrepency?


x = pinv(A)*b;

but this gives

jk:4> pinv(A)*x
ans =


i am not sure what you expect A\b to do.  it's underdetermined so i
guess matlab just picks a working solution.  you could just take
a/some column(s) of A and divide those into b.  this gives you a
partial x.  fill with zeros to taste.

J o h a n  K u l l s t a m
Don't Fear the Penguin!

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

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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