Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Setting parameters via Manipulate?
Replies: 5   Last Post: Jan 31, 2013 8:46 PM

 Messages: [ Previous | Next ]
 Bob Hanlon Posts: 906 Registered: 10/29/11
Re: Setting parameters via Manipulate?
Posted: Jan 26, 2013 4:58 PM

fixedSettings = {
{a -> a1, b -> b1, c -> c1, d -> d1},
{a -> a2, b -> b2, c -> c2, d -> d2},
{a -> a3, b -> b3, c -> c3, d -> d3},
{a -> a4, b -> b4, c -> c4, d -> d4},
{a -> a5, b -> b5, c -> c5, d -> d5}};

Manipulate[
Column[{
StringForm[
"a = `1`, b = `2`, c = `3`,
d = `4`, e = `5`, g = `6`",
a, b, c, d, e, g],
"\n",
f[a, b, c, d, e, g]
}] /.
fixedSettings[[ParameterSet]],
Control[
{{ParameterSet, 1, "Select\nParameter Set"},
Control[
{{e, Pi/2, "Select e"}, Range[-Pi, Pi, Pi/4],
{{g, 0, "Set g"}, -5, 5, 1,
Appearance -> "Labeled"}]

Bob Hanlon

On Sat, Jan 26, 2013 at 1:41 AM, Peter =C4=8Cendula <cendos@gmail.com> wrote:
> Hi Tamas, I have exactly the same problem. Did you come to solution in the meantime?
>
> Thanks
> Peter
>
> On Thursday, October 6, 2011 10:27:47 AM UTC+2, Lengyel Tamas wrote:

>> Dear Community,
>>
>>
>>
>> I am facing a rather hard to learn problem in Mathematica: setting
>>
>> multiple parameters simultaneously.
>>
>>
>>
>> The basic problem is as follows: I have a set of parameters that define a
>>
>> physical element (in my case an optical fiber). There are some standard
>>
>> fibers with fixed parameters.
>>
>> I wish to have a drop down menu (PopUpMenu in Math 8.0 I believe) that
>>
>> sets these parameters to fixed values and have a few other parameters that
>>
>> are adjustable in my simulation.
>>
>>
>>
>> Ideally I wish to have all parameters to be able to be set using
>>
>> Manipulate or some other sort of way (input string) and have drop down
>>
>> menus that make these variables "jump" to the defined value.
>>
>>
>>
>> My questions are:
>>
>>
>>
>> -how can I implement this selection-type menu with fixed parameter sets and
>>
>> -how can I have those parameters be adjustable alongside the above method?
>>
>>
>>
>>
>>
>>
>> Tam=E1s Lengyel

>
>

Date Subject Author
10/6/11 Lengyel Tamas
1/26/13 Peter Čendula
1/26/13 Bob Hanlon
1/29/13 Peter Čendula
1/30/13 Bob Hanlon
1/31/13 Peter Čendula