Tag Info

New answers tagged

1

for completeness here is the LocatorPane version suggested by @m_goldberg comment. DynamicModule[{pt = RandomReal[{-1, 1}, {3, 2}]}, LocatorPane[Dynamic@pt, Graphics[{Circle[], Line[{{0, 0}, Dynamic@pt[[#]]}] & /@ Range@Length@pt}]]]


3

n = 3; Manipulate[Graphics[{Circle[{0, 0}],Line[{{0, 0}, a[[#]]} & /@Range[Length@a]]}], {{a, RandomReal[{0, 1}, {n, 2}]}, Locator, LocatorAutoCreate -> True}] Alternatively, Manipulate[Graphics[{Circle[{0, 0}], Line[Tuples[{{{0, 0}}, a}]]}], {{a, RandomReal[{0, 1}, {n, 2}]}, Locator, LocatorAutoCreate -> True}]


3

Download code You can download a notebook with all the code in it by running the following code: Import["http://goo.gl/NaH6rM"]["http://i.stack.imgur.com/sMWJ2.png"] Code with comments The first thing to do is to separate your headings from your data: rawdata = {{"n", "t(n)", "t(n)/t(n-1)", "Ø(t(n)/t(n-1))"}, {20., 1.15, "", 1.30081}, {21., 1.54, ...


3

Dialogs are notebooks with different from regular options settings, so you can export save them as you want: (that is the case with palettes too) Export[ FileNameJoin[{$TemporaryDirectory, "myDialog.nb"}], CreateDialog[ Column[{ InputField[Dynamic[a], Number, FieldHint -> "enter a"], InputField[Dynamic[b], Number, FieldHint ...


3

Is this what you mean? Manipulate[ Grid[{{txt}, {idx}}], Grid[{ {"T", InputField[Dynamic[txt, {txt = #; idx = StringLength[txt]} &], String, ContinuousAction -> True]}, {"index", Manipulator[Dynamic[idx, {idx = #} &], {0, Dynamic@StringLength[txt], 1}], Dynamic[idx]} }], {{txt, ""}, None}, {{idx, 0}, None} ]


1

You have a few small mistakes which are easily fixed. Manipulate[ Dynamic @ Plot[f[x], {x, -10, 10}, PlotRange -> {-10, 10}], {{f, a # + b &}, {a # + b & -> "Linear", Abs[a # + b] & -> "Absolute Value"}, ControlType -> PopupMenu}, {{a, -2} -3, 3, 1, Appearance -> "Labeled"}, {{b, -3,}, -5, 5, 1, Appearance -> ...


2

I do not understand everything the code is suppose to do, but passing the control as a pure function inside a variable declaration might give the desired behavior. The other change is the variable-setting function in the Dynamie for r4 was changed to actually set the value of r4 upon an update. Manipulate[ Row@start, {{r2, "q", "R2"}, {"p", "m", "q", ...



Top 50 recent answers are included