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
49 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
84 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
229 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
56 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
114 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
105 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
63 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
63 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
38 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
43 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
33 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
93 views

pure function assignment

I do not understand this statement from the Introduction to Dynamic tutorial: ...
1
vote
0answers
19 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
61 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
66 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
31 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
vote
1answer
53 views

How to find invariant sets of nonlinear operators below

How to find invariant sets of nonlinear operators below. $$x[n+1]=0.9∗y[n]^2/(y[n]+2)+x[n]∗(1−0.8/(1+x[n]))$$ $$y[n+1]=0.8∗x[n]/(1+x[n])+0.6∗y[n]$$
1
vote
0answers
29 views

Clear variables on window close

I'm using DynamicModule[{ var1, var2 }, CreateDialog[ (*some code here*) ]] In order to be able to deal with memory isolation for multiple copies of a program ...
1
vote
3answers
83 views

Obtaining Pixel Values, from an image, while being able to zoom

I've built a small manipulate widget to extract a pixel value from an image whereever the mouse is clicked: ...
1
vote
1answer
42 views

Comparison of NDSolve and Asymptotic Output Tracking results: Problem identified

My question is a continuation of the topic: Asymptotic Output Tracking: Code Issues Edit: Take system of ODE for example: $\begin{cases} \frac{dx}{dt}=H \cdot \alpha \sin(\omega t)+\alpha \omega \cos(\...
4
votes
1answer
40 views

Select from list using a TogglerBar to specify one or several criteria

Simple version of my problem. Create a list of 50 integers. Create a TogglerBar to select one or more members of the list. Use Select to select sublists from the larger list. I can't figure out how to ...
2
votes
0answers
38 views

Affine state-space: Nonlinear output

I am using a system of equations to experiment: $\begin{cases} x_1'=x_2 \\ x_2'=x_1^2-x_2+u \end{cases} $ As an output, I want to use the following non-linear output: $y=e^{-x_1^2}$ ...
3
votes
2answers
105 views

Execute code when file is modified in Mathematica 12.0

I have a text file called file.txt that is being modified every few seconds by an external program (my Stenography machine's software). ...
4
votes
0answers
95 views

DynamicModule Error when assigning Nothing to variable

Assigning Nothing to a variable inside Module works as expected: ...
3
votes
1answer
95 views

Get symbol at mouse position

How can I get the symbol which is under the mouse pointer at any time? I know that I can get the mouse position with MousePosition[] and dynamically with ...
1
vote
1answer
44 views

How to make a responsive multi-control ui with Dynamic?

I want to create a custom ui control with interacting elements. For simplicity, assume there are going to be three Sliders, where each successive ...
3
votes
1answer
99 views

Dynamic colour wheel

An extension of this question, I'd like to create multiple locators as per the example below: ...
2
votes
1answer
56 views

How to generate a non-linear animation?

Here is a simple example, as time goes by, the speed of animation playback is increasing The built-in function Animate seems to only play animation at a uniform ...
2
votes
0answers
41 views

Natural decay in the rate of Animation

I am trying to introduce a decay into the rate of animation of a graphics object by setting the AnimationRate in the Animator to a dynamic variable which is itself continually updated through a self-...
3
votes
1answer
95 views

Best way to make live animations

I often find myself in a situation where I want to see something animated 'live'. With this I mean I have some data, a function to update that data let's call it ...
1
vote
1answer
72 views

Accommodating local variables within Dynamic

I would like to use a local variable within Dynamic, but that may not work, and the front end will show the local variable in red to give a warning. However, if I ...
2
votes
1answer
62 views

How to use Dynamic with ArrayPlot or similar inside Manipulate?

I have some complicated data to calculate and display. I want to change the display inside Manipulate with a control variable and use ...
0
votes
1answer
70 views

Cannot program NDSolve for two-variable system of ODE [closed]

Please help program a system of 2 ODEs: \begin{cases} \frac{dx}{dt}+\frac{dy}{dt}=\frac{df}{d{(x+y)}} \\ \frac{d}{dt}(\frac{df}{d{(x+y)}})+\frac{df}{d{(x+y)}}=0 \end{cases} where $f=-(x+y)^2$ There is ...
1
vote
0answers
37 views

How to set focus in a dynamic graphic with InputFields

Happy New Year! I am trying to set cursor focus in this timetable application. When the minutes are all entered the activity blocks resize. Tabbing out of the minutes field moves focus to the ...
2
votes
1answer
33 views

Accessing InputFields within dynamic graphics without multiple clicks

I'm trying to write a timetable application. (The activity blocks are to be resizable and reorderable.) A problem I have run into, which might be a showstopper for this approach, is that entering ...
3
votes
2answers
64 views

How to separate the performance of controls in Manipulate?

I would like to build a Manipulate object, for which some variables will be related to corresponding controls. For example, in this simple Manipulate object, if I change any slider control, both ...
2
votes
1answer
42 views

Manipulate and DynamicImage

I would like to use DynamicImage within Manipulate, but have been unable to get the contents of DynamicImage to update. This basic example demonstrated the problem: ...
1
vote
1answer
40 views

How to obtain desirable performance of dynamic variable?

I need to create the code that generates a sample based on an adjustable parameter and, later, interactively calculates statistics or builds a plot for the generated sample. Let's insert a slider <...
1
vote
2answers
90 views

Confused by result of NDSolve for Second-Order nonlinear ODE

It is impossible to solve numerically a nonlinear second-order equation, although the initial conditions are given. ...
7
votes
2answers
304 views

How do I place the Clock arrows inside this clock face?

I am trying to program a clock, I have the face I want and the hands but I can not seem to put them together so they work..... ...
2
votes
1answer
41 views

How to use controls for creating static variables

I try to create a static variable initialized by some control. Let's create PopupMenu control ...
1
vote
1answer
48 views

Solution of a system of nonlinear ODE in the form of a state space with nonzero initial conditions

I have a system of differential equations like this: $\begin{cases} \frac{dx}{dt} = hpf_1 \cdot \alpha \cdot sin(\omega t) + \frac{d}{dt}(\alpha \cdot sin(\omega t)) \\ \frac{dhpf_1}{dt} + hpf_1 = \...
2
votes
0answers
34 views

Need to determine turn in Connect Four based on mouse clicks (Mathematica)

I am making a connect four game and I need to figure out which graphic to use (red or black) by how many times the mouse has been clicked. So I need a counter for mouse clicks. That way I can make an ...
4
votes
1answer
55 views

Invert Selection checkbox

I want to use a checkbox to invert the current checkboxbar selection, the code now basically works, but I hope that when the checkboxbar is all selected or not, the status of the first checkbox will ...
4
votes
2answers
150 views

I would like to monitor a file sieve.txt and take its contents in dynamic

I would like to monitor a file sieve.txt and take its contents in dynamic. :I did this but Dynamic does not work in this case: ...

1
2 3 4 5
26