I have a function that I would like to construct the Manipulate
parameter list with Sequence
. This is a simpler example but it has the same behaviour.
x[a_, b_, c_] := a + b + c
parmsForSlider = {{#, 5. *10^6}, 1.*10^6, 20.*10^6, 0.5*10^6} & /@ {a, b, c} ;
parmsForSlider
has the list for items I need for Manipulate
. I can get the sequence in a fake function.
f[q, Sequence @@ parmsForSlider]
However, if I try this in manipulate it does not separate out paramsForSlider
as it does for f
.
Manipulate[AccountingForm[x[a, b, c], DigitBlock -> 3], Sequence @@ parmsForSlider]
Instead it gives the error:
Manipulate::vsform: "Manipulate argument Sequence@@parmsForSlider does not have the correct form for a variable specification."
However, if I type in the parameters and ranges it will work.
Manipulate[
AccountingForm[x[a, b, c], DigitBlock -> 3],
{{a, 5. * 10^6}, 1. * 10^6, 20 * 10^6, 0.5 * 10^6},
{{b, 5. * 10^6}, 1. * 10^6, 20 * 10^6, 0.5 * 10^6},
{{c, 5. * 10^6}, 1. * 10^6, 20 * 10^6, 0.5 * 10^6}
]
Have I done something incorrectly? I'm using 10.0.2 in Windows 8.1 64bit.
Evaluate[Sequence[...]]
. Looking for duplicate... $\endgroup$