From help-octave-request at bevo dot che dot wisc dot edu Mon Jan 29 07:41:48 2001 Subject: Re: Nonconformant \ behaviour From: "Johan Kullstam" To: help-octave at bevo dot che dot wisc dot edu Date: 29 Jan 2001 08:44:19 -0500 "Richard Gould" 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? try x = pinv(A)*b; but this gives jk:4> pinv(A)*x ans = 0.033333 0.066667 0.100000 0.133333 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 [kullstam at ne dot mediaone dot net] Don't Fear the Penguin! ------------------------------------------------------------- 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 -------------------------------------------------------------