I have a function with a long list of parameters, for example:
n = 20;
CoeffList = Table[Symbol["a" <> ToString[i]], {i, 1, n}];
DegreeList = Table[x^i, {i, 1, n}];
TermsList = Table[CoeffList[[i]]*DegreeList[[i]], {i, 1, n}];
polinom = Sum[TermsList[[i]], {i, 1, n}]
Result of polinom:
a1 x + a2 x^2 + a3 x^3 + a4 x^4 + a5 x^5 + a6 x^6 + a7 x^7 + a8 x^8 +
a9 x^9 + a10 x^10 + a11 x^11 + a12 x^12 + a13 x^13 + a14 x^14 +
a15 x^15 + a16 x^16 + a17 x^17 + a18 x^18 + a19 x^19 + a20 x^20
Now I want to create plot of this expression inside of Manipulate module, to play with parameters and look at the changes of value of the expression.
Manipulate[
Plot[polinom, {x, -10, 10}],
Control[{{a1, 1, "a1"}, -100, 1000, Appearance -> "Labeled"}],
... ..
Control[{{a20, 1, "a20"}, -100, 1000, Appearance -> "Labeled"}],
]
How I can automize the process of adding controllers in such way, that I don't need put a lot of strings of code to create controllers for them and don't need change the code if I will increase n from 20 to 50?
