0

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

xaxXos
  • 77
  • 1
  • 7

2 Answers2

3

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!

PlatoManiac
  • 14,723
  • 2
  • 42
  • 74
2

Among many solutions, the clearest is :

Last /@ sol3
andre314
  • 18,474
  • 1
  • 36
  • 69