Mathematica Using Mathematica: Read Variable Parameters Outside Manipulate

  • Thread starter Thread starter mr_hack
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary
In Mathematica, to access variable parameters defined in a Manipulate function outside of it, you can assign the parameters to new variables within the Manipulate. For example, by setting a variable like c1 equal to c within the Manipulate, you can use c1 in other operations outside of the Manipulate. This allows for greater flexibility in using the manipulated values in subsequent calculations or plots. The approach is straightforward and enhances the usability of parameters defined in interactive visualizations.
mr_hack
Messages
3
Reaction score
0
Mathematica to use it!

Hey guys

I was wondering if there a way to read the variable parameter in Manipulate outside the manipulate , what i mean 4 example :
Manipulate[ Plot[am E^(-(x - c)^2/(2 sigma^2)) , {x, 0.004, 0.00415}],
{sigma, 0.00001, 0.00015}, {c, 0.0040754, 0.00415}, {am, 1, 10000}]

if i change the 'am' or 'c' or 'sigma', how can i use them in other operation, outside the manipulate.

Thx in advance..
 
Physics news on Phys.org


Simply set some other variable equal to their value, e.g.:

Manipulate[c1 = c;
Plot[am E^(-(x - c)^2/(2 sigma^2)), {x, 0.004, 0.00415}], {sigma,
0.00001, 0.00015}, {c, 0.0040754, 0.00415}, {am, 1, 10000}]

Then you can use c1 elsewhere.
 


DaleSpam said:
Simply set some other variable equal to their value, e.g.:

Manipulate[c1 = c;
Plot[am E^(-(x - c)^2/(2 sigma^2)), {x, 0.004, 0.00415}], {sigma,
0.00001, 0.00015}, {c, 0.0040754, 0.00415}, {am, 1, 10000}]

Then you can use c1 elsewhere.

THx a lot, that's very kind of you
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
7K
  • · Replies 10 ·
Replies
10
Views
3K