Problem with linsolve?



"loosen" is cool!

However, I don't think we have a consistency problem here, as evidenced 
by the following:

X : genmatrix(x,3,3)$
r(i) := sum(X[i,j],j,1,3)$
c(j) := sum(X[i,j],i,1,3)$
linsolve(
  [r(1)=r1,r(2)=r2,r(3)=r3, c(1)=c1,c(2)=c2,c(3)=c3],
  [x[1,1],x[1,2],x[1,3]]
)

Maxima encountered a Lisp error:
Error during processing of --eval option "(cl-user::run)":
The value 2 is not of type LIST.
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

			Kostas


Stavros Macrakis wrote:

> Maxima should never give a Lisp error like this, but... your equations
> are inconsistent anyway.  Let's see if we can make them consistent by
> changing one value:
> 
> eqs: [r(1)=10, r(2)=5, r(3)=3, c(1)=1, c(2)=3, c(3)=13]$
> 
> loosen(n):=
>  block([neqs:substpart('xxx, eqs, n, 2)],
>     subst( solve( neqs, listofvars(neqs)), 'xxx)) $
> 
> makelist(loosen(i), i, 1, 6) =>
> 
>               [9,  4,  2,  2,  4,  14]
> 
> Yes....
> 
>                 -s