Tagged Questions

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

learn more… | top users | synonyms

1
vote
1answer
241 views

dynamically set fit parameters and models with FindFit

I want to fit a gaussian profile by setting some values dynamically, but FindFit returns an error and i can't see the problem. with a given gaussian: ...
11
votes
3answers
347 views

Drawing an arrow pointing at the “Enable Dynamics” button

Sometimes my students are given Mathematica notebooks as part of an assignment, and asked to go through some demonstrations contained in the .nb file. A lot of times I get complaints that the "graphs ...
1
vote
1answer
63 views

InputField Insertion Point Movement

I am trying to make the Return Key move the insertion point to the end of the input field's text. Please see the example below for the problem I am facing. Namely, when the return key is pressed, the ...
0
votes
1answer
73 views

Trouble avoiding computation in DynamicModule when input field is not defined [duplicate]

I'm having trouble detecting when my InputForm supplied String variable has a value. After looking at: How to compute values only if input fields are filled? I tried a StringQ test: ...
1
vote
1answer
100 views

Manual CellGrouping option causes crash at cell evaluation

Update: Try to reproduce this behaviour with CellGrouping set to manual. To do that: either evaluate ...
4
votes
3answers
297 views

How to change the color of a button while it is pressed

I want to change the color of a button while it is pressed, pause for a short time and then change the color back to the original color. I can't seem to figure out how to do this (tried various forms ...
7
votes
1answer
156 views

Asynchronous evaluation on EventHandler

How can I make this progress bar appears when I press Enter? The Button Evaluate works just fine, but when Enter is pressed it jumps the progress bar. It would be ...
5
votes
1answer
182 views

How to make a piece of a pie chart change color upon clicking it?

I am trying to use the EventHandler and have managed to make the text change color upon clicking it, but cannot seem to make each piece of the pie chart change ...
1
vote
1answer
83 views

Issue with DateListPlot and Dynamic List

Imagine that we are getting readings from an external device (ie Arduino) at a given interval of time. We'll simulate the reading as follows. ...
0
votes
1answer
83 views

Use a pre-computed list instead of RandomInteger

I would like to replace RandomInteger[{1, 10}, {10, 10}] in the following code: ...
3
votes
1answer
258 views

Combine a dynamic module with a manipulation

I would like to combine a dynamic module with a manipulation, whilst maintaining the functionality of both. I have tried things like Show and ...
3
votes
1answer
84 views
2
votes
3answers
125 views

Dynamic plot with Evaluate on expression

I'm trying to make a make a plot of a table of expressions, which should be pre-evaluated (since they are infinite series with analytic sums). I'm able to make the plot normally with ...
2
votes
2answers
122 views

Getting variables out of Dynamic Modules after restoring the program

The scrap of code below [from Mathematica's Help on DynamicModules] generates a Pane of ...
2
votes
1answer
136 views

Buttons Which Change Color, Each Time Pressed [closed]

I need to have 100 buttons, which their color is defined by the parity of number of times they are pressed: If they're pressed an even number of times their color is blue, and otherwise red. I don't ...
3
votes
4answers
280 views

Change all Options of Plot Dynamically

I am trying to make a series of changes in the appearance of the Plot of some function. I am trying to use Manipulate for my experiments. I tried to change the following code ...
3
votes
1answer
143 views

Confusing font information from CurrentValue

I'm trying to programmatically get the width of a character in Mathematica's default fixed-width font, Courier. I believe CurrentValue holds the answer but I'm ...
1
vote
1answer
182 views

Manipulate with variable number of sliders plus variable number of functions

I'm trying to setup a Manipulate where I have a variable number of sliders similar to this one, where every slider controls a function. In my case, there will be an additional slider which sets the ...
2
votes
3answers
267 views

Animation is jerky, but slider is not

When I do the following simple animation (from the book Mathematica Navigator, p. 316) the slider control changes the image smoothly, but when I play the animation it is jerky. Is there anything that ...
1
vote
1answer
153 views

Create Slider to start/stop/move Point

I want to be able to start, stop, and move the dynamically moving point simultaneously in both animations. The "PlayPauseButton" in the animations only controls the given animation. Indeed, I want ...
2
votes
3answers
129 views

Incorrect behaviour of Locator inside Show?

Why doesn't Locator behave correctly in the following code? ...
8
votes
2answers
280 views

How to draw the image of a circle under the action of a transformation of the phase flow?

How to draw the image of a circle $x^2+(y-1)^2<1/4$ under the action of a transformation of the phase flow for the equation $\dot{x}=y,\ \dot{y}=-\sin x$? Here $\dot{x}$ means $dx/dt$. Any help or ...
2
votes
1answer
217 views

Why is this expression being held, and how can I evaluate it?

I can't figure out why an expression isn't evaluating, even though there's no Hold* in its FullForm: ...
1
vote
1answer
118 views

Control multiple locators along a plot

Update 1 @ Michael E2, my effort - for what it is worth!: ...
2
votes
2answers
383 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 ...
3
votes
2answers
319 views

How to show the coordinates of a point and the equation of a line dynamically? [duplicate]

I am constructing a diagram that consists of a sine curve and its tangent line at a given argument. However, I want to show the coordinates of the point of tangency and the equation of the tangent ...
2
votes
1answer
148 views

Manipulate Locator warping (snap to cursor)

I'm looking to have a Manipulator Locator that moves in discrete steps and requies the user to click on/near the locator position.. consider these two examples: ...
5
votes
1answer
186 views

Using free-form linguistic input in a dynamic input field

I've been playing around with dynamic input fields; here's a basic example, which just consists of an input field where the user can enter a function and then a button that can be clicked to graph the ...
2
votes
1answer
102 views

Input[] inside DynamicModule causing a kernel crash

I have those few lines of code causing a crash and I can't figure out why: ...
3
votes
1answer
116 views

Dynamically apply a function fed by Input[]

Here is a bit of code: funlist = {Plot,ListPlot}; Input[Panel[PopupMenu[Dynamic@whichfun, funlist], "blabla"],Dynamic@whichfun] The idea here is to select what ...
12
votes
3answers
209 views

Selective evaluation of blocks of code in a Manipulate

Is it possible to attach certain pieces of code to certain controls in a Manipulate? For example, consider the following Manipulate ...
3
votes
2answers
134 views

Dynamically show usage

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

Delay of events detection dependent of “MouseDown” position

Let's say we have a Rectangle with color which depends of CurrentValue["MouseOver"]: ...
3
votes
1answer
313 views

Automatically dealing with “disable dynamic updating”

I'm programmatically creating notebooks containing dynamic content. When a new notebook is being created, a window pops up: I then manually click on "Continue" and it will create the notebook. The ...
1
vote
1answer
129 views

Creating a Dynamic MSSQL connection

Hello i am trying to create a notebook that automatically connects to a database on MSSQL server and would then query this to create a sort of personal report. I have connected to this database and ...
2
votes
1answer
112 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
133 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
187 views

Make dynamic controls from existing list

I have a list of variables (c1,c2,c3,c4), each with its ...
0
votes
1answer
93 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
152 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
61 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
94 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
120 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
251 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
90 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
57 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
166 views

Wrapping grid with dynamic

I'm trying to build a sortable grid: ...
7
votes
1answer
264 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
73 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
167 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 ...