Re: inputing nothing in a manipulate box
- To: mathgroup at smc.vnet.net
- Subject: [mg101745] Re: inputing nothing in a manipulate box
- From: Albert Retey <awnl at gmx-topmail.de>
- Date: Thu, 16 Jul 2009 08:16:09 -0400 (EDT)
- References: <h3kdhk$g72$1@smc.vnet.net>
Lobotomy wrote:
> If you have a Manipulate command with a function generating a graph
> and then input nothing there will be an error. nothing=!=0 in this
> case. with nothing i mean, erasing whatever number is there and
> pressing enter without entering 0 or any other number.
>
> how can this be solved? i want that nothing == 0 in my calculations
> when one uses the input box
Would that help?
Manipulate[
Plot[Sin[a + x], {x, 0, 2 \[Pi]}],
{{a, 0, "a"},
Manipulator[Dynamic[a, (a = Replace[#, Null -> 0]) &], {0, 1}] &}
]
albert