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
3 votes
0 answers
54 views
+50

Is it possible to prevent the very first evaluation of Dynamic when it appears on screen?

Is it possible to tell DynamicBox to not run its very first dynamic evaluation when it appears on screen, and instead, to just show its ...
  • 19.3k
2 votes
1 answer
32 views

Run Initialization in Manipulate Manually

Although I have received a lot of help, there is a rather difficult question. Let we have a system with parameter: $$x_{n+1}=x_n^p$$ As long p changes, we have to ...
  • 817
0 votes
1 answer
63 views

Recording results of Manipulate

I'm studying the effects of some parameter on a complex system. When we change the parameter, the system is converted and we need to write each new state to the list. Problems encountered in using <...
  • 817
1 vote
1 answer
46 views

Creating and printing a real-time evaluation timer

I want to print a timer that starts at 0 when an evaluation begins and stops when the evaluation is completed. I have come up with the following solution using Clock...
3 votes
1 answer
48 views

DSolve output displays different from actual output after using locator in Manipulate

V 13.2.1 on windows 10 If you look at this it does look bizzar, right? The same variable sol is different from what it should be above it. But the above ONLY ...
  • 127k
0 votes
0 answers
26 views

Change parameter in dynamically updating plot // Manipulate outside of Dynamic // GUI for dynamic plot

I want to dynamically plot the Kuramoto model with the parameter K as an adjustable slider \dot theta_i = omega_i + K/N \sum_j sin(theta_j - theta_i) For fixed K, ...
  • 1
4 votes
1 answer
71 views

Dynamic module won't pause when toggled (version update problem?)

I ran this code in 2019 to give my students a simple Fourier filtering exercise. It generates some multi-tone sound data, then plays the tone (allowing the user to pause the playing, since the tone ...
1 vote
0 answers
43 views

How to track the changes of the variable on a low level / TrackedSymbols? [duplicate]

There is a nice option to Dynamic or Manipulate wrapper functions, where one can specify, which of symbols Mathematica should ...
2 votes
0 answers
38 views

Freeze slider if locator moved

I have list of many locators in my Manipulate: {{listoflocs, listoflocsinit }, Locator, LocatorAutoCreate -> True } And I have a slider there: ...
  • 21
0 votes
0 answers
49 views

Reset Button for Manipulate and freezing Sliders

I work on a Bezier curve subdivision project. I managed to implement it, but I faced some problems. (The code of my program is presented below.) Firstly, if I change parameter n after changing other ...
  • 21
2 votes
1 answer
61 views

Example of using Dynamic and DynamicModule from Wolfram site

What this example code from https://reference.wolfram.com/language/ref/Dynamic.html (under Applications section the first example) should teach us? ...
  • 5,925
2 votes
2 answers
152 views

'Manipulate' keeps updating output even though the manipulated variable has not changed

Why is the following code keeping updating an output with increasing variable v, even though I have not changed the manipulated variable ...
  • 5,925
0 votes
0 answers
42 views

Preventing Evaluation of Body of Manipulate

Overall, I am looking for a way to prevent the evaluation of the body of Manipulate until the controls meet a certain condition. For example, consider the following....
4 votes
1 answer
96 views

How to Build an Interaction GUI that Interrupts Calculation?

I would like to construct a GUI using just the Mathematica language that allows me to start and stop a calculation interactively with the press of buttons. I have set up the following to show what I ...
  • 101
1 vote
0 answers
69 views

DynamicModule for dynamic function with parameters

I want to be able to Dynamically Plot functions with parameters. One should be able to change the parameter and the function, while the function field should accept the parameter and the variable, ...
  • 111
0 votes
1 answer
112 views

How can I nest a complex function?

I am examining the mandelbrot set so I need to iterate the function f[z_Complex, c_] := (z)^2 + c Besides, I want to choose the complex numbers dynamically from ...
3 votes
1 answer
107 views

Possible Lagrangian: ODE and System of ODE's

For the Lagrangian: ...
  • 2,304
1 vote
0 answers
35 views

Can one use Ctrl and cursor position to get short documentation from a function like hovering

I would like to minimize how often I use my mouse. One time where I have to use the mouse is when I hover over a function to see the options for that function and a short explanation of the usage of ...
  • 4,599
0 votes
1 answer
47 views

Dynamically highlighting all substrings

I want to dynamically highlight all substrings that are equal to selected substring inside string str. Also I want the string str...
  • 5,925
4 votes
2 answers
214 views

Animating a potential function (eigenfunctions of Laplace's equation) - something has changed

I had this working with Kuba's help some time ago see here but something has changed. I am using version 13.0. The animation lay out has changed to this configuration where the animation bar is ...
  • 15.6k
4 votes
1 answer
152 views

Problems when Manipulating viewpoint of Graphics3D[cube]

I wanted to Manipulate the ViewPoint of Grphics3D[Cube[]]. My codes are ...
  • 3,623
0 votes
1 answer
79 views

Plotting the solution of the following equation with integral boundary conditions

This is my equation: E1 = D[u[x, t], t] + D[u[x, t], x] + u[x, t] == 0; ic = {u[x, 0] == Sin[\[Pi] x]}; bcc = {u[0, t] == Integrate[u[x, t], {x, 0, Infinity}]}; ...
1 vote
2 answers
83 views

A bug in InputField of type Expression?

I have a problem with a simple InputField of type Expression: ...
2 votes
1 answer
79 views

Problem With Dynamic[] in Graphics

I'm writing a little function to quickly draw some bezier-curves and lines on diagrams. The function opens a DialogInput. The user can use Locators to draw a line onto the diagram. When the user ...
  • 401
1 vote
2 answers
74 views

A strange error occurs when using First, Last, and Take to pick out list elements for dynamically styling a button

The top function setstyles is the only one we need to focus on. However, the four functions below it are needed for this to work. These validate up to 4 properties ...
  • 2,337
2 votes
1 answer
98 views

How to create multiple dynamic variables at once?

With the following code: x[1] = 0; Checkbox[Dynamic[x[1]], {0, 1}] Dynamic[x[1]] I can create the dynamic variable x[1] and it ...
  • 5,061
5 votes
3 answers
147 views

How to incorporate ResourceFunctions to autocomplete

Edit: As mentioned in the comments below, typing just ResourceFunction["Mo"] results in a list of ResourceFunctions that have a name that starts with Mo. This is good enough for me although ...
  • 4,599
4 votes
1 answer
74 views

Verbose `Dynamic` variable lists

Is there a way to achieve the following without listing all of the dynamic pieces so verbosely / manually listing all the dynamic variables? ...
  • 8,322
0 votes
0 answers
36 views

How to use NotebookDynamicExpression on a timed event

I have a few questions for how the feature NotebookDynamicExpression was used in ResourceFunction[SetNotebookAutoSaveTime]. Below is the entire definition: ...
  • 2,337
0 votes
1 answer
51 views

Dynamic 2-state toggle button difficulty returning to original state

I had this working fine this morning, but I proceeded to refactor, and somehow I cannot get it to toggle like before. It does initialize, and it does go from state-1 to state-2 but not back to state-1....
  • 2,337
2 votes
1 answer
90 views

Mathematica frequently stops responding

Every time I run a cell, move the cursor, start typing, the entirety of Mathematica stops responding. I am getting "Disable dynamic evaluation" pop ups but I have disabled Dynamic in the ...
  • 182
0 votes
1 answer
50 views

InputField - change text alignment to center

Is it possible to align text in InputField Right/Centered? (Seems Left is default) Seems there is no alignment option for InputField. What I want is center - More specifically, Real-time centered : I ...
  • 3,623
0 votes
0 answers
31 views

Convenient way to make a text cell togglable

I like being able to hide text cells in a notebook. Currently I am doing this by writing another text cell above the current text cell, writing "open" and then grouping the cells. That way ...
  • 4,599
0 votes
1 answer
73 views

A very simple Dynamic Button label is not updating when state changes

Just when I thought I had Dynamic tackled for most non-complex controls, this comes along and makes a mockery of me. So what the ...
  • 2,337
3 votes
2 answers
162 views

How use Locator for planar point and image of that point under a function?

Consider the following function as mapping the {x,y}-plane to a copy of that plane: F[{x_, y_}] := {x^2 - y^2, 2 x y} I want to ...
  • 11.6k
10 votes
2 answers
416 views

Improving progress bar code (10 years latter)

In the last 10 years (see this post) when I want to track the result of a longer calculation, I use the following pattern: ...
  • 25.8k
0 votes
0 answers
47 views

Two interactive ListLinePlots

I need to build an interactive interface to visualize multiples plots at the same time. Let's consider two lists: ...
  • 21
1 vote
1 answer
87 views

Make plot manually update with Manipulate instead of auto resetting

I'm trying to write a script that will dynamically update when I change the tensor that I am working with and the interval tensor elements. Whenever I update the tensor elements that I am working with ...
  • 27
4 votes
1 answer
69 views

Cross sections of Histogram3D in both dimensions

I am trying to visualize a list of about 1 million {x, y} tuples, and for this I made ...
0 votes
0 answers
54 views

Fullscreen "real-time" animation without margins

Suppose you have a function mapping a discrete input, e.g., ranging from 1 to $n$, to an image. Each image resulting from a sequence of such inputs should be displayed in fullscreen one after the ...
0 votes
1 answer
56 views

Dynamic lines with plot as background

I am trying to generate two lines (with 2 points each) that are dynamically updated with a plot as background. I have come quite far, but do not manage to add the plot as background. ...
  • 900
0 votes
0 answers
25 views

Making Interactive Lists Using Popup Menus

I'm having trouble making a popup menu that will select a value and input it into a new list/edit a defined list. I would like a nested list to be edited using the pop-up menus without duplicate lists ...
1 vote
0 answers
106 views

High performance fullscreen visualization of image sequence

What is the fastest way you can come up with to display an image sequence in fullscreen where each image in the sequence must be shown? Here is my attempt. Let's create a 1920x1080 image as this is a ...
3 votes
1 answer
69 views

How do I import a file only when it is modified?

I am trying to create a Dynamic code that will Import the contents of file only if it has been modified. I tried the following ...
  • 8,697
8 votes
1 answer
187 views

Where to place Dynamic in an expression?

I've just started playing around with dynamic elements and I am confused over where exactly I should be placing Dynamic[] in an expression. My reading of the related help is it should be around the ...
0 votes
0 answers
199 views

error "Kernel not responding to Dynamic Evaluation"

I have got error with large-scale Problems that needs a solution by LinearProgramming, I am working on TSP Problem and I write the Linear Formulation for this Problem (Note: I know that there is a ...
  • 73
5 votes
1 answer
241 views

Calligraphic Pen Signature Pane

This exchange about writing the infinity symbol using a calligraphic pen nib (https://mathematica.stackexchange.com/a/13376/43662) gave me an idea that is a bit steep for me to implement. The idea is ...
  • 1,867
2 votes
1 answer
53 views

Use PopupMenu to choose a treatment

I have a list of treatments: treatmentsNames={"walk","run","fly","swim","dream"} I want to use this list to ...
  • 297
4 votes
1 answer
132 views

How to add to a dynamic variable?

Why can't I add to the dynamic variable z below? z = 1; Dynamic[z] + 1 returns 1+1 and not ...
  • 143
0 votes
1 answer
85 views

Two locators in separate plots using Manipulate

I want to create two figures, side by side, each with an independent Locator. I want to do this using Manipulate, because I can easily use information from each Locator in both plots. This answer did ...

1
2 3 4 5
29