Hello, here a newbie using HP Prime, Thank you for your attention.
As I am using solve() for getting the solutions of a simple polynomical system, it provides 2 pairs of solutions. The question is, how can I store each of them wihtout retyping?.
Maybe the attached screenshot will help to understand the question.
ScreenShot
Thank you in advance.
Pedro ML
you can copy the list to a variable,
and then ask for 1st solution :
and for the 2nd :
This also works:
L1:=solve({2*x^2+3*y^2 = 1, 2*x+3*y = 1},{x,y})
L1(1) ==> [-0.29 0.53]
L1(2) ==> [ 0.69 -0.13]]
I see, thank you!
As L1 is a list and elements are matrix 1x2, then I need:
L1(1)▶M1
L1(2)▶M2
and I can use M1(1,1), M1(1,2), M2(1,1), M2(1,2)
Is that right?
(04-29-2016 09:49 AM)PedroML Wrote: [ -> ]I see, thank you!
As L1 is a list and elements are matrix 1x2, then I need:
L1(1)▶M1
L1(2)▶M2
and I can use M1(1,1), M1(1,2), M2(1,1), M2(1,2)
Is that right?
M1 is a vector in this case, with size(M1) == 2. So elements of the vector are:
M1(1) == -0.29
M1(2) == 0.53
M2(1) == 0.69
M2(2) == -0.13
When:
L1:={[-0.29 0.53], [0.69 -0.13]};
L1(1,2) ==> 0.53 (For example, to reach the second element of the first vector, as a one dimensional array, in a list of vectors).
As a vector, there aren't any rows and columns, its just a one dimensional array. M1(row, col) works for matrices. Lists, vectors, and matrices are a subject that could stand additional clarification in the user references. Lists and vectors have a lot in common. The solve() command is one particular example. For instance, if you try the examples given in the calc Help, some return lists, and others return vectors. The Help detail says the command "Returns a
list of the solutions..."
Thank you both, got it!!!
So quickly all answers. Great.