0

I received three results of calculations:

{k->0.190729}

{k->0.197575}

{k->0.249319}

Could you help me write the results in the following form:

{0.190729,0.197575,0.249319}
Kuba
  • 136,707
  • 13
  • 279
  • 740
Magda
  • 1

1 Answers1

0

For illustrative purposes:

Solve[(r - 1) (r - 2) (r - 4) == 0, r]

yields: {{r -> 1}, {r -> 2}, {r -> 4}}

r /. Solve[(r - 1) (r - 2) (r - 4) == 0, r]

yields: {1, 2, 4}

If you want to transform:{{r -> 1}, {r -> 2}, {r -> 4}}

all the following produce {1,2,4} (the first seems simplest):

r /. {{r -> 1}, {r -> 2}, {r -> 4}}
#[[1, 2]] & /@ {{r -> 1}, {r -> 2}, {r -> 4}}
Last /@ Flatten[{{r -> 1}, {r -> 2}, {r -> 4}}]
Flatten[#[[All, 2]] & /@ {{r -> 1}, {r -> 2}, {r -> 4}}]
ubpdqn
  • 60,617
  • 3
  • 59
  • 148
  • Why not doing a Community Wiki since it's a clear duplicate, and since it can be easily found in the documentation? – Öskå May 07 '14 at 11:36
  • @Öskå sorry...agree easily found in documentation and sadly do not known what doing a Community Wiki means...apologies for ignorance. Aim was just to facilitate OP understanding...happy to be referred to duplicate – ubpdqn May 07 '14 at 11:41
  • And @ubpdqn there is a little box "Community Wiki" between the editable text and the preview :) And I do agree on the fact you did provide a clear answer :) – Öskå May 07 '14 at 12:17