Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

The following command outputs a list of replacement rules.

sol3 = Flatten[
             y@t /. NDSolve[{y''[t] == -10 - 3/10 Sin@#, y'[0] == 12 Sin@#, 
             y[0] == 0}, y[t], {t, 0, 2 Pi}], {t, 2}] & /@ (Pi/180 Range[
             10, 80])];

How can I convert that list into a list of real values? eg. replace each 't->2.45' with 2.45

share|improve this question

marked as duplicate by Sjoerd C. de Vries, kglr, Oleksandr R., Murta, Artes Feb 8 '13 at 0:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Maybe t /. sol3? – m_goldberg Feb 7 '13 at 21:41
related (duplicate?) Extract values from replacement list – kglr Feb 7 '13 at 22:13
up vote 3 down vote accepted

You get all the t values with the following.

sol3[[All, 2]]

There are many ways but another nice pattern matching solution

sol3 /. (_ -> a_) -> a


share|improve this answer
Much appreciated! – xaxXos Feb 7 '13 at 23:50

Among many solutions, the clearest is :

Last /@ sol3
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.