Miham,

Thanks for the suggestion. It is rather elegant.  However, I really
want to be able to assign a more convenient label to the created
symbols. That is, I want to assign

a11 -> a_11, a12 -> a_12, etc as the new symbols are defined.  In  a
loop would be nice, but I can not seem to get the syntax right.  Here
is what I want:

for i in range(1,3):
     for j in range(1,3):
          aij = Symbol('a_%d%d' % (i,j))



and have an array of labels aij with i and j ranging over the
range(1,3).

Thanks for the neat suggestion.

Comer
On Feb 6, 12:59 pm, miham <tlora...@gmail.com> wrote:
> In case you can't find it in the previous post, here it is again:
>
> Matrix(3, 3, lambda i,j: Symbol('a_%d%d' % (i,j)))

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to