| Author |
Comment/Response |
Chuck Saunders
|
02/09/13 3:10pm
I have a FindRoot function that returns an angle theta. However, it doesn't return just the value, it returns something that looks like:
{theta0 -> 1.49823}
This is fine if I want to manually copy/paste the 1.498.. from the output, but I don't. The output is correct, but I want to be able to assign the output to a variable, like:
theta_solved = FindRoot[ stuff ]
And have theta_solved = 1.498. Right now, that equation just has theta_solved equal to the curly bracketed values, and I can't use that in any other equations.
How do I get the 1.49823 out of the brackets? I've seen theta_solved[[1]], and that gives
theta0 -> 1.49823
which is equally not useable, and Flatten[theta_solved] doesn't do anything.
URL: , |
|