Re: [sage-support] using the value of a symbolic expression

2013-12-12 Thread Vincent Knight
You can do two things jeanpat: 1: sol=solve(2*x+1==7,x, solution_dict=True) print sol # sol is a list of dictionaries (key: variables, value: solution value) print sol[0][x] 2: sol=solve(2*x+1==7,x) print sol # sol is a list of equations print sol[0].rhs() # takes the first (and only on this

[sage-support] using the value of a symbolic expression

2013-12-12 Thread jean-pat
Hello, After having solved an equation, I'd like to use the result for another calculation (calculating y) or a ploting. How to convert sol into a numerical value? thank you jeanpat sol=solve(2*x+1==7,x) print sol print sol[0], type(sol), type(sol[0]) #y=2*sol+7 #print y #plot(sol,0) -- You