kill(all)$

fluid :appendix 'index representation of a matrix'
peter.vlasschaert@gmail.com,25/05/2019

load packages.
=============

load(linearalgebra)$

load(lrats)$

q1: genmatrix(a, 3, 3);

q2:diff(q1,a[1,1]);

p1:atom(a(i,j));

representation : index notation.
===========================

b:[11,12,13,21,22,23,31,32,33];

bb:makelist(concat(a,b[i]),i,1,length(b));

rem : concat build a string to make 'new atoms  = 'Maxima' '= symbol.
--------------------------------------------------------------------------------------------------------
see : 'p5a' not atom.

h:[];
for i:1 thru 3
do(
    for j:1 thru  3
    do(    
    k:(j-1)*3+i,
h:endcons(a[i,j] = concat(a,b[k]),h)
    ));

=>  double loop don't forget : do statement ,twice.

=>  collect data : empty string , example : 'h:[]'

h1:h;

reverse the elements in the list :

h2:makelist(rhs(h1[i])=lhs(h1[i]),i,1,length(b));

depends(bb,[x,y,z]);

reason : why  ?
------------------------

---------------------------------------------------------------------
depends don't allow use index notation : a[i,j]
---------------------------------------------------------------------
see above : 'p1'

info : depends.

dependencies;

q3:subst(h,q1);

q4:diff(q3,x,1,y,2,z,3);

simp;

only property 'simp :false', inside block statement.

q5:block([simp:false],subst(h2,q4));

rem : you see : outside block statement , simp :true.

simp;

1e)  simp combination with ev  ?
===========================

q6a:[x=x[1],y=x[2],z=x[3]];

info :

x:1
y:2
z:3

q6a1:ev(q5,simp);

index : representation of a matrrix
=============================

q6a2:ev(subst(q6a,q5),simp);

simp;

2e)  nouns combination with ev ?
============================
nouns : general  evaluation.

q6b:ev(q5,nouns);

same result : 'q6a2'

3e) diff combination with ev ?
=========================
diff : specific evaluation for differentation.

q6c:ev(q5,diff);

same result : 'q6a2'

example : 'q6b,q6c' the same evaluation.

simp;