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
0
votes
0answers
27 views

A trouble localizing variables with DynamicModule

I have created an application that simulates a random sample for the experiment of rolling a dice three times and recording the outputs as $(a,b,c)$. The code is the following ...
0
votes
0answers
15 views

How to show two (or more) plots, but only evaluate one in Manipulate? [duplicate]

I have a lot of spectral data in .csv format and I need to assign each spectral line to the respective sinusoid. The general idea was to load the dataset in Mathematica, ListPlot the data and then use ...
0
votes
0answers
14 views

Flipping diagonals in a regular polygon

Say, I have a triangulation of an octagon: ...
1
vote
1answer
32 views

Extracting the output of FlipView and then updating

Say I have a triangulation of an octagon: ...
2
votes
2answers
69 views

Changing a diagonal inside a regular $n$-gon when clicked

I am trying to understand the use of Dynamic, DynamicModule, EventHandler, etc. I created an ...
3
votes
2answers
66 views

Too much space after Slider

In part of a dynamic module I have a slider and I wish to put the units after the value. So I have done this: ...
2
votes
0answers
66 views

How to smoothly zoom into GeoGraphics without label flicker?

I would like to animate zooming into maps in a smooth fashion while showing labels - but without them flickering or jumping: ...
3
votes
1answer
56 views

Nested front-end-only EventHandler

Bug introduced in 11.3 or earlier, and persisting through 12.0 CASE:4372001 confirmed I am running into an issue trying to improve the performance of my user interface by moving as much of the ...
5
votes
1answer
53 views

Creating a dynamic list of parameter defined functions

I'm trying to create a list of functions that is dynamic in size and defines function names like so: ...
1
vote
1answer
60 views

Defining functions in a CDF and Manipulate [closed]

I want to deploy an interactive CDF that may depend on several functions. How do I define those functions? I'm using Manipulate, I defined the function inside it ...
7
votes
2answers
75 views

Avoid clipping label in IntervalSlider?

For custom appearances IntervalSlider seems to clip on the right side: ...
0
votes
0answers
47 views

Undo dynamic input

Here is a simplified example of the problem. ...
1
vote
0answers
40 views

How do Mathematica processes DynamicBox? [closed]

I've heard that Mathematica uses a session ad hoc to process DynamicBox, but I don't know any detail. I am using DynamicBox in ...
4
votes
2answers
70 views

Manipulate lists as function arguments

I am trying to write a Demonstration, which I believe means I must write it as a Manipulate, not a DynamicModule. My question is essentially the same as "Dynamic lists as function arguments", but I ...
1
vote
1answer
72 views

Dynamic Delimiter in Manipulate

Consider the following ...
1
vote
1answer
54 views

Representation in state-space of a system with ideal and real differentiating links in feedback

There are two systems in the state space with an ideal and a real differentiator. For the first system, the code in Mathematica is as follows. ...
0
votes
1answer
60 views

How to make the pressing of a button keep an event occurring at a controlled rate? [duplicate]

Suppose I use a Button[] to make some event occur, how can I make the pressing of this button keep that event occurring at a controlled rate? I tried the following: ...
0
votes
1answer
28 views

How to use buttons to add or subtract in real time?

I am trying to do the following: ...
3
votes
1answer
80 views

A button that creates a cell and evaluates it

Short version: PasteButton will paste its contents at the input cursor. I am looking to create a similar button that will paste something into a new cell and ...
1
vote
1answer
46 views

Manipulate expression giving error messages [closed]

I'm trying to debug this example code from a textbook: ...
0
votes
0answers
24 views
0
votes
1answer
36 views

Solving a fifth order polynomial with changing values of coefficients [closed]

I have a fifth order polynomial in x whose coefficients depend on a certain variable k. Now, I want to find the real roots of that polynomial for each value of k, say from 0.1 to 2 in steps of 0.05 ...
1
vote
0answers
65 views

Phase portrait of n-dimensional state-space system

It is usually not difficult to study the state space for n = 2,3 variable states. What if these variables are more than 3, for example 4,5 or 6? There is a rule according to which the dynamic features ...
2
votes
1answer
96 views

How to interactively draw a bitmap with mouse?

I cannot find the MNIST dynamic activation example I strongly believe I have seen in the documentation. What would be the most efficient way to draw a black &...
0
votes
1answer
39 views

How to make Mathematica output updated Graphics inside Manipulate?

I have created a code to get information about countries. I created a tooltip to identify cities on a graphics but when I go through the popup menu and click another country, the code doesn't ...
0
votes
1answer
36 views

How to make Button print the last updated point?

I am trying to create a graphics that outputs the population of a city on the graphics that is clicked. The problem is that it is not updating the last point that is clicked. Please help. ...
0
votes
1answer
31 views

Drop doesn't work with Dynamic lists

So I have this code right here. ...
4
votes
3answers
170 views

Aligning Control in Manipulate

I'm trying to use Dynamic and If inside Manipulate to alternate controls depending on a ...
0
votes
1answer
123 views

How to make a point bounce off of walls?

Say we have a square and a point inside. How to make the point bounce off when it hits the walls. No gravity. EDIT: New here, should've been more specific. The point has to fly in some random ...
9
votes
1answer
315 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
50 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 ...
6
votes
2answers
256 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
47 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
79 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
70 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
53 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 ...
4
votes
1answer
80 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
58 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. ...
0
votes
0answers
32 views

Stopping dynamic updates

I have some data that requires selection using arbitrary thresholds, which is easiest done by eye. So I have set up a dynamic plot with two locator points for selecting the region I want. ...
4
votes
2answers
75 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
32 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
86 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
51 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
39 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
90 views

Module vs. DynamicModule wrt ProgressIndicator

Why does the following work for Module but not DynamicModule? ...
3
votes
0answers
60 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
99 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
50 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
132 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
46 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 ...

1 2 3 4 5 24