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
4
votes
1answer
88 views

Disabling an individual button in a SetterBar

I'm trying to create a set of SetterBar within my DynamicModule, but I want to have it so that an individual button gets ...
-1
votes
0answers
69 views

time evolution in time dependent hamiltonian

I have a time dependent Hamiltonian(A(t)) which NOT commutes at different times. dU(t)/dt=A(t)U(t)+n(t) How can I find the time evolution operator of this system so that I can solve it in Mathematica? ...
1
vote
1answer
47 views

Define variables dynamically to compute a function

Let's say I have defined a function $W(p, q)$, where $p$ and $q$ are integers between (and including) $0$ and $2$ and the function takes me to a real number. Upon an input $n$, where $n$ is a positive ...
2
votes
2answers
75 views

DynamicModule & Manipulate Plot

I tried to write a convenience wrapper around Manipulate for easier plotting. However I failed already at the very first step. Consider the following example: ...
4
votes
2answers
68 views

Why does Manipulate update without change of TrackedSymbols?

Below you find a very minimal version of a code, where the Manipulate keeps updating (run is constantly printed) despite the Tracked symbol not being changed. Funny enough, this only happens if d1 and ...
0
votes
0answers
34 views

How to create an Interactive Solver using either Dynamic, Dynamic Module, Manipulate, Form Page, and Form Function?

I am working on creating interactive solvers for laws in physics where first select a variable to solve for such as displacement/length/position, density, mass, torque and electricity and then enter ...
0
votes
1answer
37 views
1
vote
1answer
108 views

My dynamic button evaluates as soon as it's created. How do I stop this behavior?

I think I finally hit on the holy grail of buttons. With a very small footprint I coded a dynamic AutoSave button whose duration and frequency can be set all the while showing very useful dynamic real ...
0
votes
1answer
62 views

Create an interactive list in a Wolfram notebook that choosing its items make a change in calculations

I have 3 variables. I want to create an interactive list of items in a Wolfram notebook that if I choose each item, functions that are written by myself change the value of the variables and ...
0
votes
0answers
81 views

Automatically redraw Plot once Locator has changed

I have a Dynamic inside LocatorPane which provides a value to be used in several other places. The idea is to have a Plot that ...
1
vote
0answers
68 views

Linearization of the ODE system: Problems

I have summarized the issues covered in the topics: Linearization of ODE without an equilibrium I ask for help with commands TransferFunctionModel + StateSpaceModel Plot3D + WhenEvent + NDSolve ...
3
votes
1answer
53 views

Please help with dynamic autosave button that only halfway works?

Ive been working on this from morning to midnight (primarily studying the docs that never seem to have useful examples) only to to make very little ground. I am trying to code a dynamic button that ...
0
votes
1answer
61 views

LocatorPane - restrict to circle

I have cobbled together a solution that does exactly what I need, but I don't fully understand how it works: ...
1
vote
1answer
51 views

I ask for help with commands TransferFunctionModel + StateSpaceModel

Given system of ODE: $\begin{cases} \dot{x}=G+u_1 \\ \dot{z}=-z+\frac{df}{dt} \\ \dot{G}=-G+z \cdot u_2 \end{cases}$ where $f=-x^2$, $u_1=\frac{d}{dt}(\alpha \sin(\omega \cdot t))$ and $u_2=\alpha \...
3
votes
2answers
134 views

Linearization of ODE without an equilibrium

Given: $\begin{cases} \dot{x}=-x^2+\frac{1}{y+1}+1 \\ \dot{y}=1 \end{cases}$ I am trying to linearize the system in the classical way, using the Jacobi matrix. ...
6
votes
1answer
138 views

Plot3D + WhenEvent + NDSolve

Given: $\begin{cases} \dot{x}=-x-By^2 \\ \dot{y}=Ax-y^3 \end{cases}$ where $x,y$ - variables; $A=[2;4],B=[0.2;2]$ - positive parameters; My task is to find the time $t_n$ of the first intersection of ...
8
votes
2answers
225 views

How to stop this computation?

I want to implement start-stop dynamics within a Manipulate environment so that, when I click a "Start" button, the simulation starts, and when I click ...
0
votes
0answers
38 views

Optimization when actively working with the NDSolve command

Lagrangian of three-mass system with Mathematica Based on the Lagrangian of a mechanical system, we can obtain a system of equations of motion. These equations can be explored numerically using the ...
3
votes
1answer
76 views

How to get StreamPlots where the density of arrows adapted (discretization ) adapts to the presence of funnels, saddle-points, etc?

I want to draw a phase portrait where the density of arrows adapted (discretization ) adapts to the presence of funnels, saddle points, and other phenomena. For example, in the code attached, the aim ...
1
vote
1answer
51 views

Move dynamic plot inside DynamicModule

I am trying to understand Dynamic a bit better for some classroom presentations, so I tried to make a dynamic list plot. As far as I can tell, this still requires ...
8
votes
1answer
192 views

How does Manipulate work "under the hood", i.e. gets converted into DynamicModule and Dynamic?

The Mathematica documentation says in Introduction to Dynamic under "Dynamic and Other Functions": Manipulate in fact produces a combination of ...
0
votes
1answer
73 views

How to have multiple ways of specifying the Control variable in Manipulate?

Consider the following as an example: ...
1
vote
1answer
62 views

Dynamic updating problem

Consider the code ...
1
vote
0answers
36 views

Grid's automatic resizing

Imagine I have a dynamic opener that changes the number of rows. For example, ...
3
votes
0answers
82 views

Button changes in 12.3 [closed]

In the new 12.3 version I noticed a change in how buttons react to the Background option. For instance, take ...
5
votes
3answers
138 views

Manipulate delimiter between control and content

Is it possible to stylize Manipulate so that there is a line separating the control and the content? The code ...
2
votes
1answer
56 views

External Dynamic Control with Manipulate

I want to have dynamic controls that depend on other controls. For example, the code ...
4
votes
2answers
150 views

Implementation of Bean machine (Galton board)

Bean machine is a triangular array of pegs, Balls are dropped onto the top peg and then bounce their way down to the bottom where they are collected in little bins.Each time a ball hits one of the ...
0
votes
1answer
57 views

How can I adjust the size of this parametric plot output? [closed]

I have a problem with the dimensions of the output of a ParametricPlot. What I'm trying to do is solve a differential equation using ...
0
votes
0answers
55 views

Output is derivative of state variable

Given simple system of ODE. \begin{cases} \dot{x_1}=-x_1+u \\ \dot{x_2}=-x_2-x_1 \end{cases} As an output, I want to use $y=\dot{x_1}$. But when I use the ...
1
vote
1answer
87 views

Asymptotic Output Tracking: Compensator properties

Asymptotic Output Tracking: Code Issues The question is, rather, of a theoretical nature (practical applications can be viewed in the topic at the link). Asymptotic Output Tracking is said to be based ...
4
votes
3answers
241 views

"Spaghetti"-solutions for ODE nonautonomous system and reduced vector field

Projections of the 3-dimensional phase-space of a non-autonomous ODE system Multidimensional obstacle avoidance in ODE (Visualization) Given simple system of ODE: $\begin{cases} \dot{x}=g \\ \dot{o}=2 ...
1
vote
1answer
61 views

Can I plot *after* setting slider values?

I have some fundamental misunderstanding of the use of Mma's GUI elements, and I would appreciate some guidance. I would like to be able to set up a calculation based on slider values and then press ...
4
votes
1answer
118 views

Multidimensional obstacle avoidance in ODE (Visualization)

A simple 3-dimensional ODE system is given: $F=\begin{cases} \dot{x}=g+g_{U_{rep}} \\ \dot{g}=-g+\frac{df}{dx} \\ \dot{h}=-h+\frac{d^2f}{d^2x} \end{cases} $ Task: Make the variable $g$ move so that ...
1
vote
1answer
115 views

Tuning the optimal control synthesized according to the Pontryagin maximum/minimum principle and choosing the cost function

I continue to study the topic I started here: Problem with optimal control and Pontryagin's maximum principle A simple ODE system $(1)$ is given: $F=\begin{cases} \dot{x}=g \\ \dot{g}=-g+\frac{df}{...
3
votes
1answer
76 views

System of ODE $\rightarrow$ Affine State-Space $\rightarrow$ System of ODE in Cauchy form

Given simple system of ODE: \begin{cases} \dot{x}=G \\ \dot{z}=-z+\dot{f} \\ \dot{g}=-g+z \cdot s+u \\ \ddot{h}+\dot{h}+h=z \cdot m \end{cases} where: $x,z,g,h$ - state-space variables $f=-(x+s)^2$ $s=...
1
vote
1answer
73 views

Multilevel ActionMenu

I am trying to build a multi-level ActionMenu. A single level ActionMenu is easy following the documents, such as ...
0
votes
0answers
30 views

FeedBack linearization and stabilization error

Consider nonlinear system: \begin{cases} \dot{x_1}=x_4+u \\ \dot{x_2}=-x_2+\frac{(\tanh(k \cdot x_5)+1)}{2}+U(t)+u \\ \dot{x_3}=-x_3+\dot{f} \\ \dot{x_4}=-x_4+x_3 \cdot s(t) \\ \dot{x_5}=-x_5+x_3 \...
1
vote
0answers
39 views

Nonlinear system with time-optimal control

Given nonlinear system: \begin{cases} \dot{x_1}=x_3+u \\ \dot{x_2}=-x_2+\dot{f} \\ \dot{x_3}=-x_3+x_2 \cdot \alpha \sin(\omega t) \\ \dot{x_4}=-x_4+x_2 \cdot (\frac{16}{\alpha^2}(\sin(\omega t)-\frac{...
0
votes
0answers
43 views

Asymptotic Output Tracking - How to Track?

Asymptotic Output Tracking: Code Issues Abstract state-space: \begin{cases} \dot{x_1}=x_3 \\ \dot{x_2}=-x_2+\frac{df}{dt} \\ \dot{x_3}=-x_3+x_2 \cdot \alpha \sin(\omega t) + u \\ \dot{x_4}=-x_4+x_2 \...
0
votes
1answer
32 views

can i create a variable which is a list and the values given as placeholders?

I have a bit of a weird question: I have a program which I transformed from an old Mathcad Program written by someone else which is a hot mess. It uses a bunch of constants in lists as inputs in ...
0
votes
1answer
49 views

Problem with the continuous equivalent of Newton's method optimization

In the article Fixed-Time Stable Gradient Flows: Applications to Continuous-Time Optimization I found an interesting formula and its properties. The screenshot of the page from the article I was led ...
2
votes
1answer
34 views

AsymptoticOutputTracking for output with boundary condition

I want to try asymptotic output tracking, but with inequality. There is a differential equation: $\frac{dx}{dt}=\frac{d}{dx}(-x^4)$ With output $y=\frac{d}{dx}(-x^4)$, The output should strive for $0$,...
1
vote
1answer
95 views

pure function assignment

I do not understand this statement from the Introduction to Dynamic tutorial: ...
1
vote
0answers
20 views

Using DynamicModule with EventHandler in the Cloud

I am trying to write a nice little program to help me and colleagues draw outlines of objects in images I came up with the following code which allowed me to click and hold down the primary mouse ...
3
votes
1answer
62 views

Creating a dynamic piecewise plot

I'm trying to create a dynamic piecewise function. I can get 3 points, but after that, everything gets a bit complicated: ...
2
votes
2answers
70 views

Building dynamic functions

When I'm trying to build Dynamic functions (as in this question), I often end up with long repeated lists of dynamic variables, like this: ...
0
votes
0answers
24 views

My mathematica is broken, can someone help? (error "Kernet is not responding to Dynamic Evaluation")

I have been doing some intensity plots on mathematica and it was working fine. It stopped responding when I tried to run 'Animate' command to try to see a simulation of the same intensity plots that I ...
0
votes
1answer
36 views

How can I create a PasteButton that changes its "contents" dynamically?

I'm trying to make a units palette to help with my various engineering courses. I thought about creating a "meta-palette" of sorts, maybe one that changes on the fly, or one where I can ...
5
votes
1answer
119 views

Build API Function

If I want to create an API function that takes two numbers a and b and returns an image. This image is supposed to be dynamically embedded on a web page that collects a and b and passes the values to ...

1
2 3 4 5
27