I'd like to change the name of a symbolic variable in each iteration of a loop, and then solve an equation using these symbolic variables e.g:
using SymPy
for i in 1:5
p{i} = symbols("p"{i}, real=true,positive=true)
solve(p{i}^2-i^2)
end
So I'm looking to create a series of scalar symbolic variables (since I don't think it is possible to create a vector valued symbolic variable) each with a different name - p1,p2,p3,p4 and p5 - and then use these in a equation solver. However the curly braces notation does not seem to work for naming in julia as per matlab. A quick google didn't suggest any obvious answers. Any ideas?