1
function [b,sexp]=trisolve(a,b,sexp)
2
//[x [,sexp]] = trisolve(A,b [,sexp]) symbolically solves A*x =b
3
// when A and b are matrices of character strings, A being assumed to be
5
//sexp : vector of common subexpressions in A, b and x.
7
//origine F. D. S. Steer INRIA 1989
15
for k=1:m,b(n,k)=ldivf(pivot,'('+b(n,k)+')'),end
16
if n==1 then return,end
19
b(l,k)=addf(b(l,k),mulf(mulf('-1',a(l,n)),b(n,k)))
29
sexp(ns)=ldivf(pivot,'('+b(n,k)+')')
30
b(n,k)='%('+string(ns)+')';
32
if n==1 then return,end
35
b(l,k)=addf(b(l,k),mulf(mulf('-1',a(l,n)),b(n,k)))