Need help to interpret unusual Maxima notation for a derivative i.e. (d^{y+1}/dx^{y+1}) rho



2009/6/8 Vishal Ramnath <VRamnath at nmisa.org>:

> My next challenge is once I set up the finite difference scheme for the
> underlying PDE's is to write the m-files in Gnu Octave to solve.

Bear in mind that Maxima includes LAPACK functions
and a separate implementation of the LU decomposition
and some other linear algebra functions.
Maybe you can tell us what you want to solve & we'll try to help.

> eq_octave: fortran(eq_new);
>
> and just replace the square brackets with round brackets in Notepad++ say.

Hmm. I see fortran(a[i]) renders the subscript with square brackets;
that seems like a bug to me since Fortran uses parentheses for
subscripts.

However f90(a[i]) outputs parentheses. load(f90) loads the f90 function.
Maybe that's worth a try.

> The only catch is that I might have?to do this "manually" because I not sure
> how to iterate over a list of variables in Maxima e.g. {rho, u, x} with
> something like a for loop which only works with numbers.

Try this: for x in L do (...) where L is some list.
This is like "foreach" is some other languages.

HTH

Robert Dodier