The (5,.22.1 version and latter) function gensym generates a unique
non-indexed symbol:
(%i12) makelist(gensym(),i,1,5);
(%o12) [g34176,g34177,g34178,g34179,g34180]
--Barton
maxima-bounces at math.utexas.edu wrote on 09/20/2010 02:18:33 PM:
> [image removed]
>
> [Maxima] How to generate a list of symbols
>
> Joshua Stults
>
> to:
>
> maxima
>
> 09/20/2010 02:18 PM
>
> Sent by:
>
> maxima-bounces at math.utexas.edu
>
> Given an integer, n, I would like to be able to generate a list of n
> unique symbols, e.g. [k1, k2, k3, ..., kn]. The closest I've been
> able to figure out is this:
>
> K : [];
> for i: 1 thru n do (
> K : append(K, [k[i]])
> );
>
> Which gives a list of indexed elements like [ k[1], k[2], ..., k[n] ].
> Is there a way to do this so that the elements of the list are *not*
> indexed?
>
> --
> Joshua Stults
> Website: http://j-stults.blogspot.com
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima