- #1
- 908
- 572
- TL;DR Summary
- "Manipulate" a variable-length coefficient array using the right number of sliders, while retaining the feature of increment/decrement buttons.
This code takes the coeffeicient array c0 from the first line and does the Manipulate thing, putting in as many sliders as the length of c0.
Problem is that I couldn't find a way to enable the increment and decrement buttons that you usually get for the sliders, even though I have put in the "Appearance -> Open". In fact, the button to open manually is also missing.
Can this be fixed so it shows the standard extra controls like + and - on each slider? Also, can I have the sliders stacked vertically?
Problem is that I couldn't find a way to enable the increment and decrement buttons that you usually get for the sliders, even though I have put in the "Appearance -> Open". In fact, the button to open manually is also missing.
Can this be fixed so it shows the standard extra controls like + and - on each slider? Also, can I have the sliders stacked vertically?
Code:
c0={1,0.3,0.1}
A=Range[0,Length[c0]-1]*2+1
Manipulate[
Plot[
Total[ c* Sin[A*2*Pi*x]],
{x,0,3}, ImageSize->650,PlotRange->{-1.2,1.2}
],
{{c,c0,Style["Coefs:",20]},{-1,-1,-1},{1,1,1},
ImageSize->{{200},{100}},Appearance->{"Open","Labeled"}}
]
Last edited: