Possible Duplicate:
Assign the results from a Solve to variable(s)

I want to assign the results of a Solve command in a list. For example Solve[-((287 s^3)/50) == 0, s] returns {{s -> 0}, {s -> 0}, {s -> 0}} I want it to return {0,0,0}. Can this be done automatically and not manually? Thank you very much


marked as duplicate by Sjoerd C. de Vries, Jens, Artes, Oleksandr R., rm -rf Nov 17 '12 at 22:18

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.


You can use

s = Solve[-((287 s^3)/50) == 0, s][[All,1,2]]

To get

s = {0,0,0}
  • 2
    $\begingroup$ ...or s /. Solve[-((287 s^3)/50) == 0, s] $\endgroup$ – J. M. will be back soon Nov 17 '12 at 15:57
  • $\begingroup$ Solve[-((287 s^3)/50) == 0, s][[All, 1, 2]] more than Solve[-((287 s^3)/50) == 0, s][[All,2]] $\endgroup$ – Öskå Nov 17 '12 at 15:58
  • $\begingroup$ You are rigth. Corrected $\endgroup$ – Murta Nov 17 '12 at 16:00
  • $\begingroup$ Ok thank you very much, you are very quick with your answers and helpful. I have been trying to find it for some time but couldn't, now i'll go check out more details in the documents about 'part'. Thanks a lot $\endgroup$ – Lazaros Moysis Nov 17 '12 at 16:02

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