Store Mathematica output from Roots as a vector

  • Context: Mathematica 
  • Thread starter Thread starter confused_engineer
  • Start date Start date
  • Tags Tags
    Mathematica Output
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
confused_engineer
Messages
34
Reaction score
1
Hi.

I want to store the output of Roots[LegendreP[3.0, x] == 0, x] as a vector.

Can someone help me?
Thanks
 
Physics news on Phys.org
confused_engineer said:
Hi.

I want to store the output of Roots[LegendreP[3.0, x] == 0, x] as a vector.

Can someone help me?
Thanks
Try
Code:
{ToRules[Roots[LegendreP[3.0, x] == 0, x]]}
 
  • Like
Likes   Reactions: confused_engineer
Yes, this seems to work. Thanks.