When using the FindRoot function on a certain function, the returned object is a rule. Specifically, the outcome is {t -> 5.19188}. My question is how I could retrieve the 5.19188 value from this answer, or if this is even possible.
Asked
Active
Viewed 32 times
1
1 Answers
0
This is done with the ReplaceAll command's infix notation syntax /.
sol={t->5.19188}
t/.sol
(*5.19188*)
Chris Chiasson
- 1,955
- 12
- 23
t /. solwheresol ={t -> 5.19188}. Or, justsol[[1, -1]]. – kglr Sep 29 '17 at 21:40{t -> 5.19188}[[1, 2]]– David G. Stork Sep 29 '17 at 21:42