On 06/30/11 02:59, Laurent wrote:
>
> Maybe you want to do something like that :
>
> sage: a=var('x,y,z')
> sage: a
> [x, y, z]
> sage: solve( a[0]*x==x,x) # This is x^2==x
> [x == 0, x == 1]
>
>
>
> If you need to generate n variables:
>
> sage: s=",".join(["a"+str(i) for i in range(1,10)])
> sage: a=var(s)
> sage: a[5]
> a6
> sage: a4*2
> 2*a4
This is what I wound up doing. I tried to name the variables c[0],
c[1]... initially just so that the python/symbol names would match.
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org