Questions tagged [dynamic]

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

Filter by
Sorted by
Tagged with
10
votes
1answer
391 views

How to dynamically select a country on a map using the cursor

Let's say I have a map of Europe with a locator in manipulate Manipulate[ GeoGraphics["Europe", GeoBackground -> "CountryBorders"], {{p, {150, 150}}, Locator}] ...
1
vote
2answers
56 views

How to choose model parameters using `Piecewise` function

The following code (developed by m_goldberg) works as expected. The model parameters can be selected by using Button, being ...
9
votes
2answers
352 views

Dynamically getting the complex number in a color wheel via moving mouse?

I have a color wheel domain which is used to describe complex numbers. I want to know is it possible to add a black spot which can be moved by mouse dynamically and return the complex number values of ...
1
vote
1answer
50 views

How can I make parameters set by an array of buttons known to other quantities in my model?

With help from @m_goldberg, I developed the following model: ...
7
votes
2answers
121 views

UpdateInterval doesn't work with Dynamic[CurrentImage]

I work on image processing using images from webcams. It's connected via USB and I get "live" images by: Dynamic[Refresh[CurrentImage[], UpdateInterval->5]] ...
1
vote
2answers
77 views

globals and `Manipulate`

The question is related to a number of questions that have been asked, but no answer is quite what I want, so I will try again. Suppose that I have a model with a lot of state - to give a stupid ...
3
votes
1answer
147 views

Updating a Dynamic variable based on another variable's change

In a dynamic interface, I am using a custom replacement for InputField that tracks two things separately: The value of the variable that is input. The boxes that ...
5
votes
1answer
107 views

Is it possible to get current thickness for every Line, Polygon, Circle object in a plot?

When exporting Mathematica graphics to raster formats with high resolution the common problem is that thickness for such objects as Line, ...
2
votes
1answer
80 views

Show all dynamic changes on button press

This is probably a silly question, but I've spent all day trying to figure it out and I can't. Below is the code. ...
4
votes
2answers
97 views

Using the Range function with the Slot (#) function

I am writing a code to display longitudinal waves. I started with the following, filling the slots using the Range function. ...
1
vote
0answers
47 views

Why do DynamicGeoGraphics and GeoGraphics not generate the same relief map?

Documentation indicates that DynamicGeoGraphics takes the same options as GeoGraphics, except with respect to projections. Thus, one might expect that given the same options both should produce the ...
4
votes
0answers
127 views

Dynamic Clock Stops Ticking

I want a dynamic timer to tell me how long it has been since a file update. I have coded a simple timer for this, but an hour or two in after completing an update, the dynamic timer stops responding ...
1
vote
0answers
52 views

Deforming a unit square into a cylinder [duplicate]

I am new to Mathematica and I am trying to create a flat unit square in the x-z plane made out of polygons with vertices that divide it into equal-length intervals on each side. Then manipulate this ...
3
votes
0answers
43 views

Mathematica Support for Simulating Kirigami Cuts

We can easily draw a grid like GraphPlot[GridGraph[{12, 12}], GraphLayout -> {"GridEmbedding", "Dimension" -> {12, 12}}] This gives us Does Mathematica ...
7
votes
1answer
116 views

Module vs. DynamicModule wrt ProgressIndicator

Why does the following work for Module but not DynamicModule? ...
3
votes
0answers
66 views

Large Dynamic expressions and responsive UI's

I have a ListLinePlot with 40,000 points. When it's displayed on-screen the input fields are not responsive (text appears slowly well after the user is done typing)....
3
votes
1answer
151 views

Constructing a 2D curve from a curvature function dynamically

I want to plot a curve starting from its curvature function and some initial conditions. This code generates a 2D curve with a given curvature (fun) and some initial conditions: ...
3
votes
2answers
63 views

Having three Control Objects for the same Dynamic variable which can override eachother

I'm creating an application with Dynamics for calculating and plotting circular orbits. It allows the user to set a custom radius, giving them an option to either use an InputField as well as a ...
5
votes
1answer
160 views

InputField, PasteButton, and Check not playing nicely with each other

Context Added to End In a previous question, I was looking for a way for an InputField to maintain the input structure of expressions so as to allow the user's ...
3
votes
1answer
79 views

How to keep seeing the updated value during a While loop?

z = 0; While[ z < 10^240, Dynamic[Refresh[z++]] ] I don't want to use Print[z] in this case, as it will generate ...
6
votes
2answers
234 views

Create an animation to pause at the specified location

How can I pause play at the specified location when export a gif file or using Animate? I want it to run automatically, no need to interact with the mouse. Here is an example: ...
7
votes
1answer
180 views

Understanding Dynamic, Refresh, and TrackedSymbols

I thought I had a pretty good handle on Dynamic, but some recent examples have made me suspect that I may have some misconceptions, and I am not finding good ...
0
votes
1answer
168 views

Using Dynamic with a list of variables

I am trying to generate a table of InputFields with a list of variables. I am generating the variable names on the fly as the lists I am dealing with have variable sizes. ...
1
vote
1answer
46 views

Dynamic and quitting the kernel

No doubt Dynamic is one of the most interesting functions in Mathematica. Not rarely we observe seemingly strange behaviour, as in the following situation. ...
1
vote
2answers
302 views

Bifurcation diagram of a difference equation

The function is f[x_, a_] := Piecewise[{{x (1 + a - a*x), x <= 1/2}, {x (1 - a + a*x), x > 1/2}}] How to make the bifurcation graphic of it? What ...
1
vote
2answers
72 views

InputField with Boxes-held formatting fails inside Dynamic

This is an outgrowth of an earlier question. I have an extensive user interface that has InputFields that I want to hold their specific structure as input by the user (e.g., keeping scientific ...
3
votes
3answers
123 views

How can I make interdependent Checkboxes?

Consider the following code, where I have a list of variables, each with different specified units. In my real case, these lists are not fixed, hence the surrounding Dynamic and the general definition ...
1
vote
0answers
157 views

Dynamic Updating Annoyance

I want to use the following grid of Dynamic variables to set values for evaluations of expressions containing those variables. ...
4
votes
1answer
75 views

Evaluate in place annoyance

I want to use the following expression to get a string value: Row[{"Enter index identifier: ", InputField[Dynamic[indexidentifier], String]}] and I also want to ...
2
votes
2answers
150 views

Flow over the circle

I'm trying to plot a vector field over a circle, Particularly the vector field in this plot: ...
0
votes
1answer
70 views

Avoiding distinct background appearing behind plo label text

I keep getting a light background behind my text when I use the PlotLabels option (see picture below). ...
13
votes
1answer
295 views

Scheduled tasks and dynamic updating

Here is an example: x = 0; Dynamic[x] now please run: SessionSubmit[x = 1; Pause[10];] Problems: Annoying one: ...
0
votes
2answers
214 views

Dynamic number of parameter fits in Mathematica

I am trying to learn if in Mathematica one can perform fits of analytic functions that are expanded and written as power series. In particular, we can consider the following generic form: $$ f(B,x) = ...
1
vote
1answer
75 views

Dynamic not updating InputField

I'm trying to do some interactive fitting of data using an arbitrary number of the same function (a Gaussian in this case). This means that I also have an arbitrary number of variables and constraints....
1
vote
1answer
70 views

Using Switch inside Dynamic with variable number of conditions

I'm trying to create some code that plots a variable number of Gaussians, and allows me to control their parameters using Locators. One locator at the top controls $...
0
votes
1answer
171 views

Plotting a circle that can move up and down the y-axis

How can I create a circle for the equation $\qquad x^2+(y-a)^2=9$ where $a$ is a parameter. I want to plot this curve with a slider $(a)$ in Cartesian coordinates (better with axes). If possible, ...
3
votes
3answers
161 views

Local variables in DynamicModule affected by outside evaluation

I was trying to use DynamicModule to create a Input cell that contains a variable assignment, where the variable name is given ...
1
vote
1answer
111 views

Two locators on two different plots in Manipulate

I am trying to create a Manipulate module that shows two plots, and have locators on each of those plots, as well as two sliders. The locators do do not affect each ...
1
vote
0answers
34 views

Basic question about update of dynamic content [duplicate]

Sorry if this has already been answered 50 times, but here it goes: why does ...
1
vote
1answer
56 views

DSolve behaves weirdly with dynamic [duplicate]

I am an beginner in using dynamics as well as mathematica. I am trying to ask mathematica to solve and plot the solution of X'=AX with dynamic every time my matrix A updates. However the Dsolve ...
0
votes
0answers
43 views

Kernel crash with InputField[Dynamic]

InputField[Dynamic[h, (h = #) &], FieldSize -> 20] Dynamic[h] When we enter h=1.1+x, the program exits. However, with <...
1
vote
1answer
87 views

How do I make a Module return values upon a button press?

I have put together a function of the form: ...
1
vote
1answer
115 views

Dynamic Plot of multiple Disk Graphics

I want to plot multiple disks with disk-coordinates and disk-radii from two dynamically updated lists. I think there should be an easy way to do that but I dont get it. Thx for your help! ...
0
votes
1answer
86 views

Advanced Dynamic Input

Note: I have corrected this question to fix an error in my understanding of RealExponent (which I have now removed). Suppose that I have a bunch of parameters that I want to set interactively using ...
8
votes
2answers
178 views

Query inside Dynamic triggers continuous high CPU load for FE

Here is a (vicious) problem I am able to reproduce with v12 and v11.3 (previous versions not tested) and OSX. This is a minimal example to demonstrate it (even if it seems useless here I do need <...
3
votes
0answers
73 views

Dynamic and TrackedSymbols

Consider Column[{ Slider[Dynamic[x]], Dynamic[x;RandomReal[]], Dynamic[RandomReal[], TrackedSymbols:>{x}] }] I expected that both dynamics would update ...
0
votes
0answers
113 views

Text with dynamic values

...
6
votes
2answers
111 views

Store Dynamic-accessible hidden metadata in a cell

Is there a way to store metadata in a cell in such a way that it can be accessed with Dynamic? Think of e.g. how ExternalLanguage cells work. We can select whether ...
0
votes
0answers
124 views

Dynamic updating issue

I would like to evaluate/simplify a series of expressions. The first set of expressions works fine, but when I try to evaluate the second line of my code (a very simple expression), the program keeps ...
1
vote
0answers
61 views

Dynamics not updating normally in Wolfram Cloud

In Mathematica, InputFields and Sliders that are connected to Dynamics will change their ...

1
3 4
5
6 7
27