Dynamic Module
- To: mathgroup at smc.vnet.net
- Subject: [mg96484] Dynamic Module
- From: John <jwa0 at lehigh.edu>
- Date: Sat, 14 Feb 2009 03:12:23 -0500 (EST)
Mathematica 6
The dynamic module, listed below, worked fine for a while, but my
recent attempts to use it caused mathematica to crash. Microsoft asks
if I want to report the problem.
DynamicModule[{n = 1, p = 1},
Deploy[Style[
Panel[Grid[
Transpose[{{Style["enter n", 20], Style["enter p", 20],
Style["simulated X", 20]}, {InputField[Dynamic[n], Number],
InputField[Dynamic[p], Number],
InputField[
Dynamic[
Quiet[Check[
Total[RandomInteger[BinomialDistribution[n, p], 1]],
Null]]], Enabled -> False]}}], Alignment -> Right],
ImageMargins -> 10],
DefaultOptions -> {InputField -> {ContinuousAction -> True,
BaseStyle -> 20, FieldSize -> {{5, 30}, {1, Infinity}}}}]]]
The module is useful to me because it is interactive, and I hope that
it can be made to work.
Can a dynamic module plot a probability distribution, if the
parameters of the distribution are entered in the panel input fields?
John