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

learn more… | top users | synonyms

2
votes
2answers
444 views

Dynamically choosing which Manipulate controls to use

I have some stuff I would like to manipulate, using two different kinds of control, one at a time, using another variable as a switch. These controls are similar in principle to ...
1
vote
2answers
62 views

Unintentional function memoisation via Dynamic

I needed to display edge labels of a graph in a way that allows the edge labels to be moved. ...
0
votes
0answers
188 views

Is it possible to create an event handler for changes in values of variables?

I am creating a networking application in Mathematica that runs a non-stop simulation, and periodically receives new information from the remote server that affects the simulation. Whenever values ...
11
votes
3answers
385 views

Plot on command within DynamicModule?

Suppose I have a DynamicModule with all sorts of controls to set some parameters for a graphics object. ...
9
votes
0answers
360 views

How to improve these WASD + mouse look 3D controls?

Insipred by this question and the corresponding answer I've written a code for full-screen exploration of 3D scenes using standard WASD and mouse look controls. Here it is. ...
8
votes
2answers
287 views

Strange behavior of CreateDialog's WindowSize option

Compare the two dialog windows, created by the same code except in the first WindowSize has a value while I omit it in the second one. Note, that ...
6
votes
2answers
258 views

A command for outputting a list of parameter values in a Manipulate interface

I am looking for a command that will output a list of values that correspond to the current parameter values manually set on a particular Manipulate interface. For ...
5
votes
3answers
262 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"}}]] ...
5
votes
1answer
307 views

Make EventHandler work for clicks and keys in a Dynamic display

I am trying to write a way that will do certain events depending on what screen is showing. What happens so far is that the screen will change in accordance to a click, but when you try to do the ...
4
votes
3answers
185 views

Is it possible to replicate the “magic” of OptionPatterns[] with DynamicModule's local variables?

Creating richer interactive interfaces that are generated by a DynamicModule invariably requires more complex data structures and in particular, a larger argument ...
4
votes
4answers
573 views

How to change color dynamically?

I am new to Mathematica and want to change the FillingStyle Dynamically in this Plot. I want ...
3
votes
2answers
128 views

Dynamically show usage

As the title states I would like to dynamically show ::usage on several functions. Let's consider two functions here: ...
3
votes
1answer
268 views

How to improve this dynamic progress bar code

I created this progress bar to use in my codes: ...
3
votes
1answer
198 views

LocatorPane, Dynamic and deleting locators

Compare the following two code snippets : Version 1 ...
2
votes
1answer
89 views

How do I constrain movement for lists of Locators using 2nd argument of Dynamic?

I need to display edge labels of a graph in a way that allows the edge labels to be moved. Locator seems the simplest and most obvious function to use. My ...
2
votes
1answer
88 views

Dynamically Updating Function

I use Mathematica 8 and am working with DynamicModule. I'm trying to enter a function in an InputField then later apply it to two values entered in subsequent Input Fields. The function just does not ...
2
votes
1answer
148 views

Render dynamic Graphics objects static

As was discussed in the comments of another question (MathLink Graphical Output (Plots) to File), Graphcis objects produced by commands such as ...
2
votes
2answers
256 views

Locator to show coordinates of plot

Old I would like to make the locator follow a plot, giving the coordinates as it moves. I don't really know where to start with this one, but I would like the dynamic plot to look something like ...
2
votes
1answer
117 views

Delay of events detection dependent of “MouseDown” position

Let's say we have a Rectangle with color which depends of CurrentValue["MouseOver"]: ...
1
vote
2answers
114 views

Is it possible to monitor the sum of squared errors in a NonlinearModelFit or FindFit procedure during the process?

Since fitting procedures using NonlinearModelFit (or `FindFit) sometimes take very long, I would like to monitor the sum of squared errors during the process ...
1
vote
0answers
60 views

Abridging Lists of Equations within NDSolve, Manipulate [duplicate]

I have a pretty little NDSolve function that I've finally decked out with manipulatable (by sliders) coefficients, which changes the graph in real time. However, I ...
0
votes
2answers
62 views

What is wrong with combining two programs with event handlers?

I can delete the unwanted nodes of a RandomGraph by double-clicking on them from the first program, and I can change the positions of the nodes by dragging them ...
10
votes
2answers
241 views

Make a button that evaluates a function over and over

I would like to have a command "RedoButton" which would make a button (or whatever control is suitable) that when clicked would print the value of a certain function over and over in the same place. ...
10
votes
1answer
209 views

Rounding problems inside InputField

Consider the following InputField InputField[Dynamic[h2, If[# === Null, h2 = h2, h2 = Round[#, 0.001]] &], Number] The ...
6
votes
1answer
152 views

How can I make sure all InputFields have values before processing a nb form?

This is a two part problem: I have a form that accepts both numeric and text inputs, then runs a function using a "process" Button. The issue I'm having is users that forget to fill out all of the ...
5
votes
1answer
121 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 ...
5
votes
1answer
351 views

Enabled option for slider in Manipulate not updating dynamically

In a Manipulate expression I have a slider control which has the Enabled option ...
5
votes
3answers
316 views

How do you properly create Buttons to change dynamic variables using Table

In this example, I want a series of four buttons to change the value of a variable that is used dynamically to drive a plot. I am trying to figure out why using Table around the buttons causes a ...
4
votes
0answers
53 views

FlipView can't handle CurrentValue[“MouseOver”]. Kernel crash

Is this code crashing your Mathematica session? (it can so look out :P) ...
4
votes
1answer
126 views

How to inherit options by scoping?

Consider the following example: you have a function framed producing a cell with a button that, when pushed, calls framed again. ...
4
votes
1answer
94 views

Why does a heavy background slow LocatorPane from updating, even if only the locators are Dynamic?

I'm having some trouble getting a dynamic plot to operate efficiently, and I think I've tracked down at least part of the problem to some pretty weird behaviour on the part of ...
4
votes
1answer
191 views

Manipulate Plot and control variables using multiple controls

Here's a simple Manipulate example: ...
4
votes
3answers
193 views

How can I create a custom control which evaluates to a list of values or replacements?

I have a set of variables which are used in various places in my calculations (solving a system, initial conditions, etc.). In order to make this easier to deal with, I want to make a control-like ...
4
votes
2answers
426 views

Switching off Dynamic updating on a cell by cell basis

Is there a simple way to switch off Dynamic evaluation for a particular cell? I usually delete the cell if it disturbs other evaluations or affects the performance ...
3
votes
2answers
145 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 ...
3
votes
2answers
309 views

Dynamic matrix multiplication

I have the following problem: I want to multiply two matrices and sum them to another matrix C. A.B+ 2B Easy! The matrix A varies as a function of three inputs a,b and c. The second matrix, B, is a ...
3
votes
1answer
199 views

Avoid crash in recursive Dynamic

With the following Dynamic cell, I can reproducibly crash Mathematica, so do not try this unless you have saved all your work! ...
2
votes
1answer
109 views

Trouble using If[] within TabView Manipulate control

If I place an If in the "body" of a Manipulate as in: ...
2
votes
1answer
121 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: ...
2
votes
3answers
194 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 ...
2
votes
1answer
214 views

Dynamically updating interactive objects in Mathematica

Is it possible to create interactive code in Mathematica (via EventHandler[] or Manipulate[] perhaps) that continually updates some calculation based on external data in the time when no user input is ...
1
vote
2answers
172 views

Locator following other locator in DynamicModule

I'm trying to create a dynamic environment where I specify, using two locators, the initial condition (position (x,y) and velocity angle (alpha)) of a 2D particle. To simplify, I'm assuming the ...
0
votes
1answer
95 views

Why do InputFields not respond in Manipulate utilizing FindGeometricTransform?

In the following code changing the InputField does not result in observing changes in a result from FindGeometricTransform, but ...
0
votes
1answer
98 views

Setting plot size within vector; dynamic slider (two part question)

I have a question about the size of a plot in mathematica. I'm working on some differential equations (a simplified model of heat transfer in a building). I've programmed it so that you can set ...
0
votes
2answers
99 views

trouble with Dynamic range in SetterBar

It appears that I can set the range to a Dynamic variable in a Manipulate control, but not in a ...
0
votes
2answers
160 views

Dynamically change the variables plotted against in Plot3D

This question posed by @Cam is the closest I can find to my question but I feel that the answers don't really guide me in the way in which I'd like to proceed.... How do I dynamically change ...
0
votes
1answer
168 views

How to build an interface that plots an equation given as text by a user?

I would like to create a window where a student may enter an equation and, by clicking on a button, the function gets plotted. In the original Spanish: Quiero realizar una ventana en la cual el ...
0
votes
1answer
146 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
3answers
238 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
123 views

TabView resets to default when selecting data using Control object

I have 3 drop down boxes on one of the tabs in my TabView. Two of the drop down boxes results are used in a Select statement to ...