Tagged Questions

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

learn more… | top users | synonyms

2
votes
1answer
44 views

Is the use of Block to temporarily override definitions inherently unsafe? [duplicate]

This may have been discussed before, if so, please let me know. Consider the following example: x = 5 Dynamic[{Clock[], x}] This will always display the ...
2
votes
1answer
59 views

Dynamic with RegionNearest keeps one CPU core at 100% - Is this a bug?

Normally, when you use Dynamic with a CPU-intensive expression, the expression only gets evaluated when a symbol in the expression changes. This doesn't seem to ...
3
votes
1answer
102 views

ExampleData menu view

I'm trying to build an ExampleData browser, so that the "collection"/"type" is selectable in a drop down menu, and the "name" is selectable in another drop down menu. What I have so far: ...
0
votes
2answers
92 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 ...
-1
votes
1answer
76 views

Add Scroll bar to Panel or Column or Row? [closed]

This will be a simple question. Sometimes it is helpful to control the size of content displayed while having a scroll bar so content is not truncated. Is it possible to have a scroll bar attached to ...
2
votes
2answers
90 views

Evaluating an If expression inside Dynamic

I was trying to display some value inside a InputField. Usually it looks like this: ...
1
vote
1answer
71 views

Two controls to Manipulate all elements of a list

Say, I have a list list and I don't want to assign different names to all its elements. What I want to do it to be able to interactively manipulate any of the ...
1
vote
1answer
88 views

Checkbox Matrix

Is it possible to create a dynamically changing binary $n \times n$ matrix $A$, which appears to the user as a $n \times n$ matrix/table of checkboxes and the user can change the entries of $A$ by ...
0
votes
1answer
95 views

Graphics // Triangle // Manipulation

I have been Mathematica user for a considerably short while. I have learned some of its functionality using wolfram how-to resources and the documentation. I am having difficulties constructing ...
6
votes
2answers
129 views

Why the Mouse dragging response not as smooth as Locator

I am experimenting to use MouseDragged eventhandler to change the vertices positions of a triangle, it works, but not as smooth as using Locators. Is this the ...
1
vote
1answer
80 views

Dynamically updating linked Manipulate variables

I am trying to write a simple cylindrical tank design notebook. Once the user inputs the desired capacity in gallons, it will compute the required volume (in cubic feet) and then offer sliders for ...
0
votes
0answers
24 views

How can I give input to an ArrayPlot [duplicate]

I would like to create a dynamic ArrayPlot so that the squares, when clicked, provide input. Can I use ArrayPlot for this? Or is there something else I should have to use.
0
votes
2answers
90 views

How to localize the symbols x,y, A, B in the following program? [closed]

I see a example in Paul Wellin's Programming with Mathematica An Introduction, 4th edition: ...
1
vote
1answer
68 views

Generation of Sliders via Tables/For loops

I have a list named data that contains lists of arbitrary size, data={{0.5, 0.5}, {}, {0.5, 0.5, 0.5}, {}, {}, {}, {}, {}, {}, {}} I now want to generate for ...
0
votes
0answers
47 views

Hide your controls inside Manipulate [duplicate]

I didn't find any topic that could help me; I hope this isn't repeated. I just want to show a control if a specific option is selected inside a popupmenu: ...
0
votes
0answers
30 views

Has anyone seen (and been able to mend!) an error involving Symbol FE`DynamicModuleVariableList?

FE`ExecuteInDynamicModule::noval: Symbol FE`DynamicModuleVariableList$67 does not have a value. >> I'm just posting the error for the moment as this is a ...
3
votes
1answer
82 views

Export LocatorPane as image by button

How to Export LocatorPane as image by button or at least by something else? Kuba, thank you! Your method works in a simple case: ...
7
votes
1answer
218 views

Why do Tooltips slow down Dynamic so much? Is there a faster alternative?

I'm working on a Dynamic ListPlot with a few thousand plots, and it seems that wrapping the points with Tooltip slows the Dynamic responsiveness substantially. With the simple example below, dragging ...
1
vote
2answers
83 views

Manipulate which creates and deletes Manipulators dynamically

I want to plot a function in a Manipulate in which the number of terms varies and a Manipulator for the coefficient of each term ...
4
votes
3answers
124 views

Using Mouseover to change the appearance of a button without writing the button specification twice

When I code in Mathematica, I often find myself having to repeat large chunks of code for a function to work. The latest example of this is a color changing button that prints when clicked, code shown ...
4
votes
0answers
119 views

Multi-Camera streaming using Mathematica

I am attempting to capture dynamic streams from multiple usb webcams using only mathematica. Using ImageCapture["Device" -> $ImagingDevices[[x]], I've tried to ...
5
votes
2answers
119 views

Checkbox behaving weird when variables are local

I have a DynamicModule in which I need a checkbox with a Max in the dynamic part: ...
4
votes
0answers
130 views

Resources for Sound Synthesis & Design

Are there any resources for sound synthesis using Mathematica? This page, Mathematica: Audio Synthesis Software, refers to other software packages, e.g. Max/MSP and Csound, for real-time synthesis. ...
0
votes
1answer
63 views

Switching the plot variable when plotting a two-variable function as a single variable function with a parameter

I would like to make easy to change the variable for which I am making a set of plots. Say I want to plot Sin, Tan, Cos and other functions of the same argument. To quickly switch from plotting it as ...
4
votes
1answer
156 views

DynamicModule inconsistent behavior; was: DynamicModule persistent UI changes

Update: I'll restate the question in hopefully more terse and clearer terms. To illustrate the issue, run this and save the resulting notebook: ...
1
vote
2answers
212 views

How to run function every x seconds?

I want to make a Graphics with a Disk whose position should update every 4 seconds. This is what I've got so far: ...
1
vote
3answers
145 views

Why does Dynamic for PlotRange in ListLinePlot prevent the proper range from being used?

I am using Manipulate to simulate Brownian motion. I want to be able to zoom in. Thus, I want to use Dynamic for the ...
3
votes
1answer
270 views

How to efficiently drag points on a curve within a Manipulate

My intention is to demonstrate on any conic various metrics properties on points belonging to the conic and connected by lines. I want the points to be dynamically moved not the usual way, ...
3
votes
1answer
110 views

How to simulate the 1-D motion of a particle under constant acceleration? [duplicate]

I am trying to represent the position of an object under freefall, but am completely lost. Here is my attempt so far: ...
2
votes
2answers
100 views

How to control Manipulate speed

I want to ask about how can we control Manipulate function so that it is not incrementing the step until the expression is calculated. I have the following simple ...
3
votes
2answers
142 views

A timed switch with Dynamic

I'm trying to make a binary switch that switches after a fixed given interval. Why doesn't the following work: ...
3
votes
1answer
139 views

Dynamic inside Button

This bit of code runs a little animation of a stochastic process: ...
15
votes
2answers
383 views

Is there a better way to add elements to a Graphics expression repeatedly?

Consider simple example where a set of points is generated and some are displayed. ...
2
votes
1answer
76 views

Dynamic Syntax - Evaluate AppendTo as the second argument

I am attempting to Append a new value into my list paramMonitor whenever the value for B ...
1
vote
1answer
99 views

Scope of variables within a Manipulate expression [duplicate]

I have a problem in defining the local variables. I have this code: ...
0
votes
0answers
51 views

Fold Dynamic Function [duplicate]

I'm making on a demo working with differential equations as functions of two variables (x and y). The demo will have to Fold the differential equation with an initial y-value and a series of x-values. ...
1
vote
2answers
64 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. ...
2
votes
1answer
92 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
231 views

DynamicModule with Plots and EventHandler

I am making a little animation in Mathematica, along the lines of some of the Wolfram demo projects. I'd like to animate a simulated trajectory of a random process (say a Poisson process), and while ...
2
votes
1answer
140 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 ...
0
votes
0answers
81 views

Dynamic and Graphics3D crash in Ubuntu

Im running ubuntu 12.04 and sometimes mathematica 9.0 crashes when I have Dynamic Content or graphics 3d. I'm wondering if this has happened to anyone else? I wouldn't be surprised if this is a ...
3
votes
1answer
103 views

How can I get precise frame rates in dynamic?

I've been the Spritz sdk in my ios apps, and I love it. For funsies I wanted to see how much less code a mathematica version would take! Using dynamic I get a nice result, shown below in code. ...
1
vote
2answers
100 views

Is it possible restore initial values after modify a control in manipulate?

I used to program in Visual Basic, but in Mathematica I have not seen some kind of restore default values after any user modification command in the Manipulate ...
0
votes
0answers
21 views

How to get a number from a dynamic variable in “manipulate” [duplicate]

I did not find any satisfying answer to my question on this website (or I did not fully understood them as I am a quite new Mathematica user...) : So my question was: How can I get a real number (and ...
3
votes
0answers
136 views

How to restrict the mouse cursor to stay within a box?

I'm trying to use Mathematica to write small games, and I find that it would help to restrict the player's mouse into the game window (just like other games do). Is there any way to achieve this? ...
2
votes
3answers
214 views

How to create locked sliders with the ability of unlocking them?

This creates two locked sliders DynamicModule[{p = {2 π, 0}, r}, {Slider2D[Dynamic[r]], Slider2D[Dynamic[1 - r, (r = 1 - #) &]]}] How can I add a check ...
5
votes
1answer
88 views

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

Is this code crashing your Mathematica session? (it can so look out :P) ...
4
votes
2answers
136 views

Entering scientific notation in an InputField

I am trying to make an InputField for numeric input, but InputField[Dynamic[num],Number] Does not allow the user to type ...
2
votes
1answer
81 views

Why can I edit only one character of the output of a Dynamic expression?

Try this: DynamicModule[{foo = \[Placeholder]}, foo] Note how we're able to edit the placeholder in the output, e.g. replace it with 42: ...
3
votes
2answers
225 views

DynamicModule/Dynamic CheckboxBar Slow for Large Lists

I am trying to create a dynamic construct that takes a large list of expressions and allows the user to interactively select any number of entries for further manipulation. This is what I have ...