Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

From indexed variables to strings

I can easily generate a list of variables with

xx = var("x", n=10, latex_name="x")

but I have many questions about this

1) nc is the number of variables needed. Say I need variables indexed from 10 to 20, not from 0 to 20. Am I obliged to generate all 20 variables and let appart the 10 firsts (I have found nothing on options like n=, could it be a range ?). 2) if I have generated the following list x=[x_1, x_2, x_3, x_4, x_5] how may i transform it in a list of strings x=['x_1', 'x_2', 'x_3', 'x_4', 'x_5'] 3) and what if I need to change the name of certain variable as 'x_3'-->'\\epsilon_2'