1

I am writing a demonstration for a digital GUI for analog filter design. Since demonstrations only allows for one Manipulate function, is there any way to dynamically update my Manipulate controls?

E.x. I have 4 different filter types (Lowpass, Highpass, Bandpass, Bandstop), the former two only require two frequency inputs while the latter two require four frequency inputs. Is there a way to switch between two Manipulate sliders and four based on which mode was selected without nesting Manipulates? Alternatively can I have all four and grey out two when they are not needed?

4

1 に答える 1

0

Manipulateこれは、目的を達成するために簡単に変更できる、動的に変化するコントロールの例です。私は書いていませんし、どこで見たかも覚えていません。

Manipulate[
 {x, yyy},
 {{x, a}, {a, b, c, d}, None},
 {{yyy, 0.5}, 0, 1, None},
 {{type, 1}, Range@3, None},
 PaneSelector[{
   1 -> Column[{
      Control@{x, {a, b, c, d}, RadioButtonBar},
      Control@{{yyy, 0.5}, 0, 1},
      Control@{type, Range@3}
      }],
   2 -> Column[{
      Control@{x, {a, b, c, d}, SetterBar},
      Control@{yyy},
      Control@{type, Range@3}
      }],
   3 -> Column[{
      Control@{x, {a, b, c, d}, PopupMenu},
      Control@{{yyy, 0.5}, 0, 1},
      Control@{type, Range@3}
      }]
   }, Dynamic@type]     
]
于 2018-10-18T04:12:33.390 に答える