[Maxima] symbolic subscript of literal list or matrix

Stavros Macrakis macrakis at alum.mit.edu
Sat Jul 21 22:48:35 CDT 2007

```On 7/21/07, Robert Dodier <robert.dodier at gmail.com> wrote:
>
> At present Maxima complains if the subscript of a literal list or matrix
> is not an integer. E.g. a : [1, 2, 3]; a[k] => error.
>
> I would like to change it so that a subscript expression is returned.
> E.g. a : [1, 2, 3]; a[k] => a[k]

Why not [1,2,3][k]?  I assume we are talking about evaluation here, not just
simplification (in which case the value of a would be irrelevant).

b : matrix([1, 2], [x, y]); b[j, k] => b[j, k]

Why not matrix([1,2],[x,y])[j,k]?

Similarly, matrix([1,2],[3,4])[1,i] should be [1,2][i] and
matrix([1,2],[3,4])[i,1] should be [1,3][i].  If you want to get fancy,
matrix([1,2],[3,4])[i,i] could simplify to [1,4][i]....

I believe Maxima should not trigger an error when there is a sensible
> partially-evaluated form of an expression. This change fixes one such
> case.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.math.utexas.edu/pipermail/maxima/attachments/20070721/14a7c7c6/attachment.htm
```

More information about the Maxima mailing list