[Maxima] Ordering of vector variables?

Raymond Toy (RT/EUS) raymond.toy at ericsson.com
Mon Mar 24 11:19:41 CDT 2008


Robert Dodier wrote:
> On Mon, Mar 24, 2008 at 9:45 AM, Raymond Toy (RT/EUS)
> <raymond.toy at ericsson.com> wrote:
> 
>> While playing with donlp2, I noticed that maxima orders vector variables
>>  in "reverse" order.   For example,
>>
>>  sum(x[k],k,1,5) -> x[5]+x[4]+x[3]+x[2]+x[1].
>>
>>  While I usually just accept whatever order maxima wants to display
>>  variables, this particular example seems wrong.  There's a natural
>>  ordering and it's by the index of the variable.
>>
>>  Any reason why it should be in reverse order?  Any objections to
>>  changing it for this case?  (I don't know if that's really possible or
>>  not.  I haven't looked.)
> 
> The terms x[1], x[2], ... are stored in order of increasing index.
> Whether they are displayed that way or reversed is controlled
> by the global variable powerdisp. When powerdisp=true the terms
> are displayed in order of increasing index.

So many globals!  powerdisp certainly does what I want, but it also 
changes how polynomials are displayed.  I always want vectors displayed 
in increasing order of index, but polynomials are different.

But this works for me.  No need to change the default.

> 
> I'm not opposed to changing the default value of powerdisp to true.
> 
> Aside from changing powerdisp, we could also change GREAT
> (the function which implements Maxima's idea of canonical
> ordering). Changing GREAT could have rippling effects, though.

If I were to make such a change, I would have it only affect arrays, and 
maybe only 1D arrays.  That should limit the effects.

But powerdisp suits me for now.

Thanks,

Ray


More information about the Maxima mailing list