Message Boards Message Boards

GROUPS:

Use a push button to set Manipulate variables to specific values?

Posted 27 days ago
202 Views
|
1 Reply
|
1 Total Likes
|

I need a push bottom instead of a check bottom that will allow me to set the manipulate variables to specific values. In th ecode below, need bottom t1 that will set .

    ClearAll["Global`*"]
    Manipulate[
     DensityPlot3D[
      z + y + Sec[x - Pi/6], {x, -2 - Pi*f1, 2 Pi}, {y, -2 - Pi*f2, 
       2 Pi}, {z, -2 - Pi*f3, 2 Pi}],
     {{f1, If[t1, 2.5, 1.5]}, 0, 10},
     {{f2, 1.5}, 0, 10},
     {{f3, 1.5}, 0, 10},
     {t1, {True, False}}
]

An attempt:

Manipulate[
 DensityPlot3D[
  z + y + Sec[x - Pi/6], {x, -2 - Pi*f1, 2 Pi}, {y, -2 - Pi*f2, 
   2 Pi}, {z, -2 - Pi*f3, 2 Pi}],
 {{f1, 1.5}, 0, 10},
 {{f2, 1.5}, 0, 10},
 {{f3, 1.5}, 0, 10},
 Item[Button["set f1 = 2.5", f1 = 2.5]]]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract