|
|
macsyma 2.4 gradef behavior
Posted:
Apr 19, 2012 10:30 AM
|
|
I have a problem where it is convenient to define only the first two partial derivatives of a function of n-variables. The code I have allows proper calculations of the type:
gradef( rsw, i, rwi ); gradef( rsw, j, rwj ); gradef( rsw, k, rwk ); gradef( rsw, l, rwl ); gradef( rsw, m, rwm ); gradef( rsw, n, rwn ); gradef( rsw, p, rwp ); gradef( rsw, q, rwq ); gradef( rsw, v, rwv ); gradef( rsw, w, rww );
Because I have several variables to define it would be convenient to define an operation of the form:
var:[i,j,k,l,m,n,p,q,v,w] /* tensor indicies */ par:makelist( concat( rw, part(var,ii) ),ii,1,10) /* list of partials to be defined */ for ii:1 thru 10 do gradef( rsw, part(var,ii), part(par,ii) ) /* define partials */ .....till done.
when the code compiles I get an error stating the gradef does not work with arrays.
My question:Does the maxima code overcome this limitation? Regards, Jim Turner, TAMU, Aerospace Eng.
|
|