Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12839 > unrolled thread
| Started by | abed.alnaif@gmail.com |
|---|---|
| First post | 2012-12-18 07:34 +0000 |
| Last post | 2012-12-18 07:34 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Programmatically specifying parameters in "Manipulate" command abed.alnaif@gmail.com - 2012-12-18 07:34 +0000
| From | abed.alnaif@gmail.com |
|---|---|
| Date | 2012-12-18 07:34 +0000 |
| Subject | Programmatically specifying parameters in "Manipulate" command |
| Message-ID | <kap6as$45g$1@smc.vnet.net> |
Hello,
Is there a way to specify the parameters for the "Manipulate" command as a string or list? I'd like to do this since I am trying to build a "framework" that makes use of the Manipulate command, and which can be used with several different types of parameters. Using one of the examples from the documentation to illustrate my point:
This works, and illustrates what I'm trying to do:
Manipulate[Plot[Sin[a x + b], {x, 0, 6}], {a, 1, 4}, {b, 0, 10}]
However, I'd like the parameters to be a variable:
This doesn't work:
parameters = "{a,1,4},{b,0,10}";
Manipulate[Plot[Sin[a x + b], {x, 0, 6}], ToExpression[parameters]]
And neither does this:
parameters = {{a, 1, 4}, {b, 0, 10}};
Manipulate[Plot[Sin[a x + b], {x, 0, 6}], parameters]
Is there a way to specify the parameters as a variable in the Manipulate command?
Thank you,
Abed
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web