I have the following Manipulate[]
working just fine.
Manipulate[
permut = Permutations[{eq1, eq2, eq3, eq4, eq5}, {3}];
eq1 = x^a - 4 y - z^b == 1;
eq2 = Sqrt[x] + y + 3 z == 4;
eq3 = x - y^2 + Sqrt[z] == 2;
eq4 = x^a - 4 y^a - z^c == 6;
eq5 = x^b + 6 y - z^c == 8;
NSolve[permut[[eqSet]], {x, y, z}, Reals],
{a, -2, 2, 1},
{b, -2, 2, 1},
{c, -1, 1, 0.5},
{eqSet, 1, Length[permut], 1}
]
I want to solve a system of 3 equations with varying parameters. With Permutations[]
I like to run a different set of 3 equations for each element of index "eqSet". I can do that for each element of Permutations[]
, no problem. My problem here is that I cannot see the group of 3 equations solved. eqSet
is an index to pick a set of 3 equations from permutations but I cannot know which set of equations have been solved.
[1] Can I get the names (such as eq1, e2, etc) of the actual set of equations being solved, for example, "eq2, eq5, eq4}"?
[2] Suppose that I solved the set of equations: "{eq2, eq5, eq4}", but now I like to replace "eq2" with equation "eq1" in this set without changing counter value "eqSet". How can I do this?
Thanks.
NSolve[permut[[eqSet]],{x,y,z},Reals]
withnames=Permutations[{"eq1","eq2","eq3","eq4","eq5"},{3}]; {names[[eqSet]],NSolve[permut[[eqSet]],{x,y,z},Reals]}
then it displays the names of the three equations along with the solution. $\endgroup$