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

  • Thread starter Thread starter confused_engineer
  • Start date Start date
  • Tags Tags
    Mathematica Output
Click For Summary
To store the output of Roots[LegendreP[3.0, x] == 0, x] as a vector in Mathematica, the command {ToRules[Roots[LegendreP[3.0, x] == 0, x]]} can be used effectively. This method successfully converts the roots into a vector format. Users seeking similar functionality can apply this approach for efficient data handling in Mathematica. The solution provided addresses the original query directly and offers a practical resolution. This technique enhances the ability to manipulate mathematical outputs in vector form.
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 confused_engineer
Yes, this seems to work. Thanks.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K