Consider matrix equation
m = {{1, 2}, {3, 4}}
l = {{1}, {0}}
p = {{p1}, {p2}}
eq = m.p == l
Solve[eq]
Output is
{{p1 -> -2, p2 -> 3/2}}
But p1 and p2 do not have these values in worksheet :-(
How to refer to each solution as p1 and p2?
Consider matrix equation
m = {{1, 2}, {3, 4}}
l = {{1}, {0}}
p = {{p1}, {p2}}
eq = m.p == l
Solve[eq]
Output is
{{p1 -> -2, p2 -> 3/2}}
But p1 and p2 do not have these values in worksheet :-(
How to refer to each solution as p1 and p2?
sol = Solve[eq]
Set @@@ sol[[1]];
{p1, p2}
This assignment has the disadvantage that it changes your original definitions of p and eq
If you want to assign to other variables:
{v1, v2} = sol[[1, All, 2]];
{v1, v2}