# Questions tagged [manipulate]

Questions on the Manipulate function of Mathematica, a function that allows the interactive manipulation of certain parameters in a Mathematica expression.

1,911 questions
Filter by
Sorted by
Tagged with
58 views

### How to plot functions from user input?

Manipulate[g[x_] = f; Plot[{g[x], g[2]}, {x, -9, 9}], {{f, "Enter a function...", "f(x) ="}}] Hi, I'm relatively new to Mathematica and this ...
68 views

### Animate a point that follows a function inside a plot

I'm trying to create a plot that shows an animation of a point moving along a function. The idea behind this is that a I want the point to follow the function until the discontinuity point. For every ...
• 69
80 views

### Old Notebook not working on 13 [closed]

I can't run on v.13 an old notebook saved in 2012 (don't have the version #) and get the following message: It is related to the "manipulate" and with disabled dynamic evaluation, when I ...
22 views

### Soave Redlich Kwong Equation Derivation and Manipulate Extraction

I have two questions regarding the use of mathematica with deriving-applying Soave Redlich Kwong Equation. The first figure shows the equation themself. 1-When I take the first and second derivatives ...
75 views

### How enforce a range constraint on an InputField for a Number as a Manipulate control

Enforcing a min/max range using a Slider is easy. Here it a Number is constrained to 0..1: ...
75 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 ...
108 views

### Animated contour plots inside multiple shapes

I am new to Mathematica and have recently been trying to investigate solar weather on power grids. I have managed to plot the power grid being studied where the vertices are substations and would like ...
• 23
78 views

### create an animation of a string

I'm trying to create an animation of motion of a physical string, it should demonstrate a "jumping rope", but I don't know what function to use, I've tried parametric plot and vector plot. I ...
• 5
1 vote
55 views

### Using an Association as a Manipulate variable?

I would like to use an association in a Manipulate or a DynamicModule. Specifically, I'd like to click to change the Values of a list of Keys of an Association. Here is some non-working code that (...
• 2,058
109 views

### How can I make Mathematica print the intersection of two intervals?

I'm trying to use NumberLinePlot and Manipulate to visualize how the interval $[t-1, t] \cap [0, 1]$ changes as the value of $t$ changes. My code is: ...
• 317
258 views

### How can I fill regions from range of x and y?

I have two lists below and each element in rangeX with the corresponding element in rangeY form a region/regions (or a line/...
• 1,696
167 views

### How to speed up this Manipulate with Show?

I'm doing this manipulation where there is a mapping between functions as follows. However, why does it not work when I substitute ...
• 1,696
1 vote
73 views

### Why does RegionPlot show an empty plot?

Problem Setting I have defined the following functions. ...
• 129
100 views

...
• 129
236 views

### How can I add a vertical spacing in a CheckboxBar?

I have an example here from the solution of @krasten 7. In this I would like some vertical spacing between the checkboxes. Any ideas? ...
• 681
54 views

...
• 129
1 vote
72 views

...
1 vote
60 views

...
• 129
34 views

### Manipulate with Show causing tiny graphics Image

When trying to do a Manipulate on a Show for a Plot the plot becomes so tiny you can't see it any more
113 views

### Selecting Plot for Locator

Assume I have a manipulate with two graphics/plots as outputs. One of my parameters is a locator. How can I select in which of the plots the locator appears? Let's say I have the output given by this: ...
47 views

### Poor rendering of graphics with Manipulate

The following code shows the third mode shape of a circular membrane.The rendering is extemely poor as the amplitue varies. Any suggestions on how to improve performance ? ...
• 221
31 views

### Manipulate plot with Eplilog where location of Point is given by a function outside of the Plot/Manipulate command

Consider a piecewise function such as f = Piecewise[{{x, 0 <= x <= x1}, {Sin[\[Pi] x], x1 < x <= x2}}] I want to plot f using Manipulate and add a ...
• 663
74 views

### Code error using manipulate

Why this code doesn't work? Can anyone help me? ...
• 153
65 views

### Manipulate does not display the output from a Show correctly [duplicate]

The following code does not display the Plot correctly. Specifically, the Plot axes are not displayed in the output. ...
• 21
42 views

### How to combine Filling with Manipulate in the given code to illustrate the total area that the lines cover?

I have three functions $f(x,y)\,,g(x,y,z)\,,h(x,y,z)\,$ ...
• 463
42 views

### How do I use a Do loop on a Manipulate?

How do I use Table or Do Loop iterators inside Manipulate? Is there a way to use Iterators inside a Manipulate function? ...
• 113
38 views

### Evaluating a function outside Manipulate

I want to plot geodesics on surfaces, where I can change the surface and its parameters. ...
141 views

### How to run Manipulate variable with different ranges?

In this code my c variable runs from -5 to 5. What should I do if I want to run only in ...
• 1,696
1 vote
72 views

### How do I use Manipulate on Show to remove/add a group of plots?

I want to be able to use Manipulate on Show[plot1,plot2] in order to make groups of plot appear/disappear. I've tried running the code below but the checkmarks doesn't add/remove the visibility of ...
• 113
288 views

### how to make two dots moving along two curves?

I got this code from a previous thread and then modified it a bit. ...
• 1,696
240 views

### How to merge join two matrixes?

First, I have a 3x3x2 matrix A, which looks like: then i have a 3x3x1 matrix B, which is: How to merge the B into A and make a 3x3x3 matrix by appending each of the element of B into corresponding ...
• 113
69 views

### Manipulate slider in awkward spot

I'm using Mathematica 12.3 and in this version sliders are placed really awkwardly: They are placed to the side instead of on top which makes them take up huge amounts of space. I believe in old ...
51 views

### How to add a polygon I can move with manipulate to a graph?

I am trying to add a polygon that I can move around with manipulate to a graph. The polygon would have four points, each of which can be moved around with a locator. This is the code I have: ...
74 views

### Manipulating dataset [closed]

I have a dataset in form of {{typ1,typ2,typ3..typ15},.....{typ1,typ2,typ3,...typ15}}. The attached image shows the table form of data. I want to select any 3 column of the data and do some calculation ...
• 383
91 views

...
• 463
1 vote
99 views

### Why does running a Manipulate code affect the output of another Manipulate code in another cell?

I am trying to manipulate two parameters from DSolve but something is happening that I don't understand. I type my first code, whith which I am trying to manipulate the initial conditions of an ODE. <...
1 vote
32 views

### Plotting issue when using Manipulate [closed]

Please refer to the below code, not sure why the plotting gives an error (Manipulate::vsform). The plotting seems to work if I remove the manipulate function. Can ...
• 21
1 vote
189 views

### Can I get the given plot without calculating the roots numerically? Is it possible to use Manipulate/Animate to get a continuous line of the points?

I have two functions $F(x,y)$ and $G(x,y)$ for $0<x\leq3$ and $-1\leq y \leq1$. Given a specific value of $y$, I want to find those values of $x$ for which we have $F=0$ and $G\neq \pm 1$. For ...
• 463
38 views

### Dynamically updating only the Manipulate local variable

Say I have an array of data arrays, assigned to a temporary variable dat, and I'd like to switch between plots of the arrays using Manipulate. For example: ...
• 103
1 vote
49 views

### Showing desired functions in Manipulate

I have a function like fun[a_, k_] := Exp[a x] + Cos[k t] I want to see how the function behaves when the parameters a and k change. So, I wrote a code as follows: <...
• 191
68 views

### Manipulate inscribed parellelepiped in an ellipsoid

Let's say we have an ellipsoid of cartesian equation : $$\frac{x^2}{a}+\frac{y^2}{b}+\frac{z^2}{b}=1$$ I want to visualise all the inscribed rectangular parellelepipeds ...
• 101
118 views

### Dynamically Center a Control in Manipulate

I am attempting to dynamically horizontally center a button above the plot window in a manipulate. For example, ...
• 4,529
69 views

### Drag around a bunch of graphics

I'm trying to draw several lines, and be able to drag around these lines all together, using a Locator. So they will all translate together when the Locator is ...
• 123
1 vote
38 views

### Passing a list reference to Manipulate has a different effect to passing the list verbatim

I had a similar question earlier, but it was answered, and including this there would be messy. This works: (it draws just the vertical sides of a rectangle of size 2w*2h) ...
75 views

### Manipulate works if I put an expression in but not if I abstract that away

This gives an error: myline=Line[{{g, 0}, {10, 10}}] Manipulate[ Graphics[{myline}, Axes -> True], {g, 0, 10}] But this works: ...
37 views

...
• 129
1 vote
67 views

### Plot with Dsolve

I am trying to plot the solution to the Dolve at a position /. x -> 0 ...
• 51
168 views

Manipulate[Column[{ Plot[Sin[a x], {x, 0, Pi}], Plot[Cos[a y], {y, 0, 2*Pi}], Plot[Tan[a z], {z, 0, 3*Pi}]}], {a, 1, 10}] I want to put a popup menu here as Sin, ...
• 129
1 vote