Efficiently Store Mathematica Output as Vector: A How-To Guide

  • Context: Mathematica 
  • Thread starter Thread starter confused_engineer
  • Start date Start date
  • Tags Tags
    Mathematica Output
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
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.