Button
- To: mathgroup at smc.vnet.net
- Subject: [mg93611] Button
- From: John <jwa0 at lehigh.edu>
- Date: Tue, 18 Nov 2008 07:19:55 -0500 (EST)
Mathematica 6
I want to use the button to enter a sample size without the students
seeing any thing but the button.
Needs["MultivariateStatistics`"]
ButtonBox[
"Flatten[RandomInteger[MultinomialDistribution[\[Placeholder],{1/6,\
1/6,1/6,1/6,1/6,1/6}],1]", Active -> True,
BaseStyle -> "CopyEvaluateCell"] // DisplayForm
Evaluation of the above
\!\(\*
TagBox[
ButtonBox[
RowBox[{"Flatten", "[",
RowBox[{"RandomInteger", "[",
RowBox[{
RowBox[{"MultinomialDistribution", "[",
RowBox[{"\[Placeholder]", ",",
RowBox[{"{",
RowBox[{
RowBox[{"1", "/", "6"}], ",",
RowBox[{"1", "/", "6"}], ",",
RowBox[{"1", "/", "6"}], ",",
RowBox[{"1", "/", "6"}], ",",
RowBox[{"1", "/", "6"}], ",",
RowBox[{"1", "/", "6"}]}], "}"}]}], "]"}], ",", "1"}], "]"}]}],
Active->True,
BaseStyle->"CopyEvaluateCell"],
DisplayForm]\)
I thought that a click on the button would let me enter a sample size.
Instead it prints out the following:
Flatten[RandomInteger[
MultinomialDistribution[\[Placeholder], {1/6, 1/6, 1/6, 1/6, 1/6,
1/6}], 1]
John