I am working with data and using manipulate function. I have two sets of values in the manipulating variable list which I combine to form a single list. So, the increment which forms the first set won't generate the second set elements of the list. How can I tell slider to specify increments differently for two halves of the manipulating variable? Here is a sample:
I form a manipulating variable set with two different lists:
k1 = Flatten[{Range[-1.61, 0, .1], Sort[-Range[-1.61, 0, .1], #1 < #2 &]}];
Random data as a function of k1
elements for the manipulate Plot:
data = Table[Table[Sin[k x], {x, 1, 5, .1}], {k, k1}];
and finally, Manipulate
Manipulate[ListLinePlot[data[[Position[k1, k][[1, 1]]]], AxesLabel -> {"x", "f"},
BaseStyle -> "Section"], {{k, -1.61, Style["k", 24]}, First[k1],
Last[k1], .1, ImageSize -> Large, Appearance -> "Labeled",
LabelStyle -> {Black, FontSize -> 25}}, AutorunSequencing -> {{1, 10}}]
This works for one half of the k1
's elements but not for the other as 0.1 won't generate the second half. Is there any If conditon or Piecewise operation to incorporate the second half of the k1
's elements?
(Note: This is a data-based question so the function Sin[k x]
isn't available.)