I am studying Dynamic and DynamicModule, and I have tried to make a simple plot of a family of real functions. The number of functions should be a dynamic variable controlled by a slider. So I have tried something like this
{Slider[Dynamic[z], {1, 4, 1}], Plot[Evaluate[Dynamic[Table[Sin[i*t], {i, 1, z}]]], {t, 0, 2 Pi}]}
In this case variable t
is highlighted in red and the output is empty. But if you do it outside of Plot[]
, then you get a correct list of functions
{Slider[Dynamic[z], {1, 4, 1}], Evaluate[Dynamic[Table[Sin[i*t], {i, 1, z}]]]}
So, how one plots this kind of things?