Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Re: List of Month Names
  • Next by Date: Linear algebra with generic dimensions
  • Previous by thread: Re: How to get the best expression of an ode's solution
  • Next by thread: Linear algebra with generic dimensions