Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This question already has an answer here:

The following command outputs a list of replacement rules.

sol3 = Flatten[
   FindRoot[
             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, kguler, 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.

4  
Maybe t /. sol3? –  m_goldberg Feb 7 '13 at 21:41
    
related (duplicate?) Extract values from replacement list –  kguler Feb 7 '13 at 22:13
add comment

2 Answers 2

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

Cheers!

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

Among many solutions, the clearest is :

Last /@ sol3
share|improve this answer
add comment

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