Questions relating to the dynamic family of functions in Mathematica, such as Dynamic, DynamicModule and Manipulate.

learn more… | top users | synonyms

2
votes
1answer
109 views

Interaction between two sliders that update the same variable

I'm basing this on the code found in the Introduction to Dynamics. I added one more slider which doesn't use the "round and snap" feature given in the link above: ...
2
votes
1answer
128 views

Remove braces, {}, from around DynamicModule output?

Is there a way to remove the braces from the front end output associated with DynamicModule? For instance: ...
4
votes
1answer
167 views

Make dynamic controls from existing list

I have a list of variables (c1,c2,c3,c4), each with its ...
0
votes
1answer
88 views

Can a large Grid of 3DListPlots be rotated by a single Dynamic control?

So I have a few hundred plots in a grid, that I thought would be nice to adjust the data view with a Dynamic slider. I'm using Jens solution for the Grid plotting here . Manipulating multiple plots ...
3
votes
2answers
151 views

Using list elements in TrackedSymbols for Dynamic

During the execution of the following code a column of three lists and two sliders are displaying in output. The first list updates if either a or b changes. The second list updates only if the value ...
1
vote
0answers
60 views

Convert ImageSize to FieldSize [duplicate]

How might I construct a function called EmToPX[p] such that the following 2 InputFields would be the same width. If not please ...
1
vote
2answers
93 views

Using Refresh to skip expensive computations

I have several variables in my DynamicModule and some parts of my computation depend only on subset of them. I am trying to use Refresh to "cache" values but can't ...
2
votes
1answer
113 views

Module Inside ToBoxes or MakeBoxes

Does someone mind explaining why Module doesn't seem to work while inside ToBoxes or MakeBoxes. ...
9
votes
1answer
247 views

Possible bug with second argument of Dynamic

According to the documentation, Dynamic Details & Options section, especially: For interactive mouse operations Dynamic[expr,{f_start, f, f_end}] typically ...
1
vote
1answer
83 views

Locator with Integer value coordinates [closed]

I want to get the Pixel value of an image.and here is my code ...
3
votes
1answer
55 views

Delete `x,y,z` occurrence (or any permutation of it) from parent data set (dynamically)?

Simple question: I would like to dynamically specify a list of 3 elements, {x,y,z}. Then I'd like to find that list, or any of its permutations, in a parent data ...
2
votes
3answers
158 views

Wrapping grid with dynamic

I'm trying to build a sortable grid: ...
7
votes
1answer
256 views

How to make dynamic input fields work with drag & drop

I have an application using InputField to allow a user to dynamically update a data structure. In some cases the user will want to remove a string from one field ...
2
votes
1answer
72 views

Strange response with dynamic texture and MousePosition

I built a cubic, then use MousePosition together with GUIScreenShot to take a floating region with fixed size (200*200) on the ...
5
votes
1answer
125 views

How can I use Dynamic to run a script when a new file is added to a directory?

I have an external program saving files to some directory on my hard disc. I'd like to run a script that imports and runs a script on each file as it is added to the directory. Is there a simple way ...
2
votes
1answer
153 views

Dynamic [ NotebookEvaluate [“_”] ]

A nice way to centralize various tasks in one notebook is the NotebookEvaluation function. For instance I can evaluate ten notebooks from a single notebook (e.g. ...
0
votes
1answer
106 views

InputField equations and Solve

I'm trying to get this piece of code to work: ...
11
votes
5answers
729 views

How can I simulate this animation of checking for prime numbers?

I can only implement a very simple one, I want to make my code look like that. Any better ideas? ...
1
vote
2answers
204 views

Import image using InputField and Button

I've got a pretty basic problem, which is probably easily solved, but for all my efforts I haven't found a solution yet: I want to make an Image importer of the following form: An ...
0
votes
1answer
120 views

Reuse a dynamic list [duplicate]

Consider this Dynamic list ...
2
votes
3answers
337 views

Making a multiple choice button

I've written the following code to create a multiple choice button that takes an arbitrary number of answer options and will assign a variable true/false depending on whether or not the correct choice ...
0
votes
1answer
160 views

How to compute values only if input fields are filled?

In the following code how can I keep the DynamicModule from computing values if the input values are not all filled? If I don't specify default values it will show the code used to compute the values ...
0
votes
0answers
31 views

Asynchronous evaluation of a button's action [duplicate]

What would be the best way to have the value of x update before the pause (or a similarly slow function) finishes executing? ...
4
votes
4answers
221 views

How to avoid writing $K$ loops?

I want to evaluate a mathematical function of $K$ variables each of variables varying between 1:N. One way to do this is writing $K$ loops and varying variables accordingly, as shown below: ...
2
votes
1answer
143 views

Change the behaviour of a LocatorPane

Normally, LocatorPane detects any single click as in the following example: ...
7
votes
3answers
481 views

What is the right way to construct DynamicModule

When I'm creating DynamicModules for CDF purposes I'm usualy basing on my experience with that, particular goal and content rather than on deep insight. I want to ...
3
votes
3answers
188 views

Extracting the coordinates of a point of interest from a ListDensityPlot

How can I extract coordinates from a list density plot. Example plot of interest: I need to place two points on either side of the center white circle and calculate the distance between them. My ...
0
votes
2answers
108 views

Assigning several values inside DynamicModule

I have coded a model that contains several parameters. The parameters can be changed interactively by the user using an interface contained in a DynamicModule[]. There are several "basic states" of ...
0
votes
3answers
302 views

Plotting function with Dynamic parameter

I'm trying to get this code working: a = 2; func[t_] := Dynamic[t + a]; Plot[func[t], {t, -5, 5}] The idea is: I'd like to have the dynamic parameter a change ...
0
votes
1answer
119 views

Embedded CDF Not Working

I happened to be looking at an old CDF (19 months old). It previously worked and does not now. It works if downloaded (opening or at URL). It requires dynamic functionality to be enabled but no longer ...
1
vote
2answers
217 views

Plotting a dynamical NonlinearModelFit Function

Currently I'm playing around with dynamics and the NonlinearModelFit function. To be precise, I want to fit a function the data, which range I want to specify ...
4
votes
3answers
350 views

Slow image manipulation

This is some extremely simple code that shows an image and manipulates a circle (that will be used to select a region of the image to analyze). All those Dynamics ...
1
vote
2answers
376 views

How to make a Dynamic Calculator to solve a quadratic equation?

Taking my first steps in the world of Mathematica Programming. The aim of my program was to modify Wolfram's dynamic calculator (which performs an addition subtraction and a product - in response ...
5
votes
3answers
287 views

Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module

Consider this code: DynamicModule[{x, y}, x[t_] := t^2 + 5; y[t_] := t^3 + 5; Manipulate[Plot[fcn[t], {t, -5, 5}], {fcn, {x -> "Square", y -> "Cubic"}}]] ...
2
votes
1answer
169 views

Autoupdate Dynamic Variable and Selectable

Does there exist a technique to construct a Cell that allows you to both auto update a Dynamic variable and allows you select the code while the variable is being ...
1
vote
1answer
218 views

Initialization Cells in CDF

I am wanting to run about 15 pages of initialization cells in a CDF, but can't seem to do so. I have set the InitializationCellEvaluation to True and InitializationCellWarning to False, but it doesn't ...
13
votes
4answers
422 views

Button evaluation inside DynamicModule

Someone know why this Button works when clicked: ...
3
votes
2answers
103 views

Restrict MousePosition to specific Graphics object

I have a problem using MousePosition. I want to restrict the value returned by MousePosition to a specific Graphics object. ...
2
votes
3answers
209 views

Changing the Actions in EventHandler

I would like to be able to change which action specified events take depending on some condition. For example, I have established a SetterBar ...
4
votes
1answer
233 views

Manipulate Plot and control variables using multiple controls

Here's a simple Manipulate example: ...
4
votes
1answer
152 views

Change CurrentValue of a key press

I was wondering if there is a way that I could change the value of a key press such as Shift, Ctrl, etc. Normally, when nothing is pressed, the CurrentValue will ...
5
votes
1answer
175 views

Using the keyboard to interactively and dynamically specify coordinates in a grid (a la Battleship board game)

In Mathematica, it is possible to create a Table or Grid of \[Placeholder] boxes. For ...
0
votes
2answers
147 views

Using Button to display dynamic graphics

I have a DynamicModule with several graphic elements. I would like to create a button which would change a parameter and re-run the entire module. Say that we have ...
11
votes
3answers
557 views

Logarithmic slider

Is it possible to create a logarithmic slider similar to this one that responds to a change of the variable value? That is, when the slider is moved, the variable value should update. When the ...
1
vote
0answers
86 views

Using Dynamic to import the chronologically newest file in a directory [duplicate]

Imagine that I have a device continually and sequentially saving files to a specified directory on a Windows machine (such as [E:\ExampleDir]). Call this device a camera with some proprietary drivers ...
0
votes
1answer
100 views

How to transform a DynamicModule into a Graphic

I am generating a graph through a custom function using DynamicModule: graph1 = customFunction[a] If I try to do: ...
10
votes
1answer
185 views

TimeConstrained dynamic change of maximum time

I would like to run a time consuming function: TimeConstrained[f[x],maxseconds] and be able to change maxseconds during running (increasing or decreasing max ...
9
votes
4answers
409 views

Graphics can't be live and editable

Is there a way to construct an interface so that the Code and the Graphics remain in sync? For example I would like to be able to drag/drop and move around different shapes in Graphic while seeing ...
1
vote
1answer
135 views

Whats is the real difference between this two examples of using Dynamic with Grid

the question is relatively simple I think. This is the first example of the code which works: ...
2
votes
2answers
182 views

Adding Dynamic functionality to a Graph

I would like to make the edges and vertices of a Graph interactive, a simple demonstration is to change their colors: ...