Le 29/06/2011 22:22, Michael Orlitzky a écrit :
This is probably just a case of "don't do that," but I thought I'd check:

   sage: c = [ var('c[0]') ]
   sage: system = c[0]*x == 1
   sage: solve(system, c[0])
   <boom>
   ...
   TypeError: unable to make sense of Maxima expression '[c[0]==1/x]' in
   Sage


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


Hope it hels in some way
Laurent

--
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

Reply via email to