exporting/displaying in programming code style



As others have mentioned, you can set display2d:false so that all output is
linear.

If you only occasionally want a linear form for (e.g.) export to another
system, you can use string(...), which actually returns a string value, e.g.

          string(x^2-1) => "x^2-1"

which you can then manipulate or output as you like.  Unlike display2d:false
or  'fortran', string does no line breaking or insertion of continuation
syntax.

            -s



On Mon, Jun 28, 2010 at 08:24, W Eryk Wolski <wewolski at gmail.com> wrote:

> Maxima is great, so I started to use it but I am still a newbe
> (searched for quite a while the manual) and can't figure out how
>  to export/display an maxima result (some equation)
> in a programming language style?
>
> So instead of getting something like this:
>                 4            3         2     2       3                4
>  2
> L = - ((2 m2  - m1 m2  - 2 m1  m2  - m1  m2 + 2 m1 ) L3
>
> I would prefer to get a display such as:
>
> L = - ((2 * m2^4  - m1^3 * m2^2  - 2* m1^2 * m2^2  - m1^3  * m2 + 2 *
> m1^4 ) * L3^2
>
> How can I change how Maxima displays formulas?
>
>
> Thanks
> Eryk
>
>
>
>
>
>
> --
> Witold Eryk Wolski
>
> Heidmark str 5
> D-28329 Bremen
> tel.: 04215261837
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>