# ListAnimate for nested lists with two sliders

I have a very complicated function of three variables (a,b,c). Now I want to plot the function value as a function of a while being able to manipulate b and c. Manipulate does not work well for me as the function takes quiet some time to evaluate. Therefore I had a look at ListAnimate which works nice if I only want to vary one parameter, e.g. for a simple example:

testList = Table[Plot[a*x^2, {x, -2, 2}, PlotRange -> {0.0, 4.0}], {a, 0.1, 1.0, 0.01}];

ListAnimate[testList]


How can I expand this to work for two variables meaning that I want to have two sliders to move through either direction of this matrix of plots.

The following example gives me an animated List instead of two sliders:

testList = Table[Plot[a*x^2/x^(b*0.1), {x, -2, 2}, PlotRange -> {0.0, 4.0}], {a, 0.1, 1.0, 0.01}, {b, 1., 10., 1.}];

ListAnimate[testList]


Maybe Manipulate can still be useful:

ClearAll[plot];
Do[
plot[a, b] =
Plot[a*(x - b)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {0.0, 4.0}}],
{a, .1, 1.0, 0.1}, {b, 0, 1, .1}];

Manipulate[
plot[a, b]
,
{a, .1, 1.0, 0.1}, {b, 0., 1, .1}
]


Keep in mind that the number of frames you want to precalculate is growing fast with number of parameters and resolution.

• Or just Manipulate[testList[[n, m]], {n, 1, Length@testList, 1}, {m, 1, Length@testList[], 1}]. Mar 11, 2015 at 14:06
• @Karsten7. yes, I don't know why I went DownValues way.
– Kuba
Mar 11, 2015 at 14:17
• @Karsten7. oh I know, because in your way you have to convert indices to values if you want to show parameters state. Not a big deal but this way is shorter.
– Kuba
Mar 11, 2015 at 14:51