On 4/1/07, Kostas Oikonomou <ko at research.att.com> wrote:
> 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)=10,r(2)=5,r(3)=3, c(1)=1,c(2)=3,c(3)=13],
> [x[1,1],x[1,2],x[1,3]] )
> Maxima encountered a Lisp error:
> The value 2 is not of type LIST.
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