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

learn more… | top users | synonyms

2
votes
1answer
138 views

Change the behaviour of a LocatorPane

Normally, LocatorPane detects any single click as in the following example: ...
7
votes
3answers
444 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
187 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
259 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
116 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
207 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
336 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
354 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
267 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
166 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 ...
0
votes
1answer
200 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
399 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
200 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
198 views

Manipulate Plot and control variables using multiple controls

Here's a simple Manipulate example: ...
4
votes
1answer
143 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
173 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
138 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
530 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
97 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
180 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 ...
8
votes
4answers
404 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
171 views

Manipulate inside a function definition

I am writing a notebook where I have to configure several curves (using locators in manipulates). in order not to repeat the code, I would like to write a function that wraps a manipulate and returns ...
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
177 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: ...
5
votes
1answer
137 views

DynamicModule variables that retain values during code reloading

At times I'll find myself building a some interface component where I want to have some localized dynamic variables, and while testing I might realize that some bit of the code needs to change, which ...
1
vote
1answer
87 views

Performing operations on function lists

I am exploring the use of Dynamic variables for the ViewPoint and ViewVertical options in a ...
0
votes
0answers
36 views

I'm definitely giving an integer, but I get Nest::intnm [duplicate]

I am attempting to make a small interactive plot that displays the plot of Cos iterated its times. Whenever I try to evaluate my ...
0
votes
0answers
190 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 ...
10
votes
1answer
189 views

Why is my rasterized graphic blank?

Consider the following code: ...
6
votes
3answers
191 views

Displaying a locator that moves smoothly and updates some dynamic variables

I want to select a point on a graph and display a function of the coordinates value. Asking here a related question I learned to use Setting. Consider the example, where I display the coordinate ...
1
vote
2answers
175 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 ...
14
votes
1answer
240 views

Dynamic and LibraryLink: dynamic visualization of a simulation

I am asking this question to save some time and I am expecting answers only from people who have tried something like this before. (I realize that I could just try it and see if it works, but that ...
2
votes
3answers
253 views

How to Export the current graphic state of a dynamic module?

After manipulating the graphics in a dynamic module like this: Synchronizing manual rotations for multiple Graphics3D outputs? How do I get at the current graphic so that I can Export the image? ...
4
votes
1answer
210 views

Dynamic legends involving show

My question is how do I get dynamic legends (legends that turn data on/off) to work with Show? This is an extension of an old question here; How to dynamically toggle curves on/off in a crowded ...
1
vote
2answers
188 views

TabView: Reset some dynamic variable on tab selection

Given a TabView panel like this one TabView[{ DynamicModule[{x = False}, {Checkbox[Dynamic[x]], Dynamic[x]}], "foo"}] I ...
2
votes
2answers
194 views

Create list via checkboxes

I am trying to achieve the following: Three (dynamically updated) Checkboxes (a, b and c) can be toggled on or off individually. Depending on their status, a ...
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 ...
33
votes
2answers
615 views

How safe is the use of Block and Internal`InheritedBlock

For many questions on this site answers are given which suggest to use Block and, especially for more advanced topics, ...
4
votes
1answer
90 views

Question about usage of Style as Dynamic object

I saw a Dynamic snippet in this answer, which wrote ...
8
votes
2answers
1k views

Dynamic graph visualisation using JLink/Java and GraphStream

Visualising the addition of new nodes and edges to a graph to 'watch it grow' is to something Mathematica is not suited to by default. However this type of animation really helps convey the emergence ...
0
votes
1answer
130 views

Dynamic Updating CreateDialog Problem

In this code, one cannot close the dialog window: {TogglerBar[Dynamic[x], Range[5]], Dynamic[x], Dynamic[CreateDialog[x]]} If I use ...
1
vote
0answers
77 views

Comparing data sets with fade transitions (Code speed-up)

I am using the utility below for data comparison. However, with my real (more complex) charts the processing is quite slow, so setting the Pause time under ...
5
votes
2answers
732 views

Equivalent of MATLAB's “hold on” function

I'm making an animation where the number of iterations is known. I tried using Dynamic, as I prefer updating in real time over generating data before plotting. I ...
0
votes
1answer
136 views

Labelling Curves Using ListLogLinearPlot within DynamicModule (So Close)

I currently have a large number of time-series datasets in the form where the name and time-series transposed data, so I have a list of lists of names for datasets and their time-dependant data. The ...
4
votes
2answers
122 views

Refresh dynamic variable when used with Get

I came across this issue with a more complicated program I was working on. Suppose we have a volatile variable data: ...
1
vote
2answers
100 views

Automatically evaluating related cells

I have the cells: In[1]:= l = 2 + 2; In[2]:= l >= 5 After evaluating them: Out[2]:= False Is there a way to evaluate ...
8
votes
1answer
351 views

Manipulate slider unresponsive after suspend in Linux

I've tested Linux Mathematica versions 7-9 on various Linux distributions, with identical problem: after suspend/resume cycle my Manipulate controls (i.e. sliders&buttons) appear unresponsive, ...