I'm trying to setup a Manipulate where I have a variable number of sliders similar to this one, where every slider controls a function. In my case, there will be an additional slider which sets the number of functions.
I've tried with
Manipulate[
Block[{},
Manipulate @@
{Plot[Table[Cos[2\[Pi]Subscript[h, i]x], {i, 1, n}], {x, 0, 1}],
Sequence@@Table[{Subscript[h, i], 0, 1}, {i, n}]}],
{{n, 1, "Waves"}, 1, 4, 1}]
but that does not work. I hope I have been successful in explaining my problem.
For instance this is partially working, except I can not add controls on functions, i.e. Subscript[h,i] in a nested manipulate
Manipulate[
Block[{
trange = {t, 0, tmax},
plotrange = {{0, xmax}, {-1, 1}},
aspectratio = 1/xmax,
f = Table[Cos[2 \[Pi] i t], {i, 1, n}]
},
Plot[Evaluate[f], Evaluate[trange], PlotRange -> plotrange,
AspectRatio -> aspectratio]
],
{tmax, 0.1, 1},
{xmax, 0.1, 1},
{n, 1, 4, 1}
]