[Date Index]
[Thread Index]
[Author Index]
Re: Button Question
*To*: mathgroup at smc.vnet.net
*Subject*: [mg84336] Re: Button Question
*From*: dh <dh at metrohm.ch>
*Date*: Wed, 19 Dec 2007 23:55:26 -0500 (EST)
*References*: <fkanep$de5$1@smc.vnet.net>
Hi John,
you entered the probabilities as strings not as numbers.
hope this helps, Daniel
John wrote:
> The cell, pasted below, is in my notebook. When the cell is evaluated,
> It prints a button, labeled simulate, but clicking on the button does
> not print the six simulated integers that RandomInteger computed.
>
> The error message says that the list of probabilities, entered as
> shown below, is not a probability distribution recognized by the
> system, but {1/6,1/6,1/6,1/6,1/6,1/6} is a valid multinomial
> distribution.
>
> ButtonEvaluator, not mispelled, is printed in red. The color red must
> be an indication of an error of some kind, but I have no idea what it
> is.
>
> Cell[ButtonBox["Simulate", Active -> True,
> ButtonFunction ->
> Print[RandomInteger[
> MultinomialDistribution[
> 100, {"1", "/", "6", "1", "/", "6", "1", "/", "6", "1", "/",
> "6", "1", "/", "6", "1", "/", "6"}], 1]],
> ButtonEvaluator -> Automatic] // DisplayForm, "Output"],
>
> In one example, I saw, the arrow between ButtonFunction and Print is
> short and preceded by a colon. If if that notation is necessary, I
> don't know how to do it.
>
> Helpful advice will be appreciated .
>
> John
>
>
>
>
>
>
Prev by Date:
**Re: pattern**
Next by Date:
**Re: is it possible to solve Matrix Equations?**
Previous by thread:
**RE: Button Question**
Next by thread:
**Re: Button Question**
| |