Is there a way (ideally simple) to combing SetterBar
with other manipulate controls? Such as have a manipulater parameter inside the SetterBar
definition.
Here I would like to use m
and n
to select parts of data set. The first example, I do it manually before manipulate. The second example was my idea how I would like to have m
and n
implemented in the SetterBar
functions. Obviously it does not work since there is cross dependence.
data = RandomReal[1, 100];
m = 10;
n = 30;
Manipulate[
ListLinePlot[{data[[m ;; n]],
d}], {d, {MovingAverage[data[[m ;; n]], 3] -> "MOA",
GaussianFilter[data[[m ;; n]], 3] -> "Gauss"}}]
Manipulate[
ListLinePlot[{data[[m ;; n]],
d}], {d, {MovingAverage[data[[m ;; n]], 3] -> "MOA",
GaussianFilter[data[[m ;; n]], 3] -> "Gauss"}}, {m, 1, Length@data,
1}, {n, 10, Length@data, 1}]