I have list of functions such that
test = {test1[a,x], test2[a,x], test3[a,x]};
I would like to plot this three function using manipulation
Manipulate[Plot[test[[i]],{x,0,1}],
,{i,{1,2,3}},{a,0,1}]
So I want to generate the function by selecting i, but actually it does not respond the manipulate. How shall I solve the issue?
Example
f1[x_, x1_] := x^2 + x1^2
f2[x_, x1_] := x^3 + x1
f3[x_, x1_] := x + x1
ftest = {f1[x, x1], f2[x, x1], f3[x, x1]};
Manipulate[Plot[ftest[[i]], {x, -1, 1}], {i, {1, 2, 3}}, {x1, 0, 10}]
ftest = {f1, f2, f3}; Manipulate[Plot[ftest[[i]][x, x1], {x, -1, 1}], {i, {1, 2, 3}}, {x1, 0, 10}]
. Part (if not all) of the problem is localization of variablex1
insideManipulate
. $\endgroup$ – march Mar 25 '16 at 18:04