Mathematica continuous evaluation

  • Context: Mathematica 
  • Thread starter Thread starter iva_bg
  • Start date Start date
  • Tags Tags
    Continuous Mathematica
Click For Summary
SUMMARY

The forum discussion centers on an issue with Mathematica's Manipulate function, specifically regarding the ContinuousAction option. Despite setting ContinuousAction to False, the user's code continues to evaluate repeatedly, even when inputs remain unchanged. The reference provided clarifies that ContinuousAction pertains to continuous evaluation during slider manipulation, suggesting that other parts of the code may be causing unnecessary re-evaluations. The user seeks advice on how to ensure the code evaluates only once per input change.

PREREQUISITES
  • Familiarity with Mathematica's Manipulate function
  • Understanding of ContinuousAction option in Mathematica
  • Basic knowledge of event-driven programming concepts
  • Experience with debugging Mathematica code
NEXT STEPS
  • Review the Mathematica documentation on Manipulate and ContinuousAction
  • Investigate alternative options to control evaluation frequency in Mathematica
  • Learn about event handling in Mathematica to manage input changes
  • Explore optimization techniques for Mathematica code to reduce unnecessary evaluations
USEFUL FOR

This discussion is beneficial for Mathematica users, particularly those working with dynamic interfaces and seeking to optimize performance by controlling evaluation behavior in their code.

iva_bg
Messages
8
Reaction score
0
Hello,

I have a Mathematica code with Manipulate [] and a number of inputs. At the end I have ContinuousAction->False, but my code keeps repeating the evaluation, even when the inputs are not changing. Ideally, I would like it to evaluate once when an input is changed. But now it goes like crazy simulating the same thing over and over again.

Any advice would be great. Thanks!
 
Physics news on Phys.org
Anyone, any ideas?
 
http://reference.wolfram.com/mathematica/ref/ContinuousAction.html

says
"is an option for Manipulate, Slider and related functions which specifies whether action should be taken continuously while controls are being moved."
which, if I am interpreting correctly, seems only relevant if you are moving a slider back and forth constantly.

So do you have something else in your code that is being re-evaluated again and again?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 18 ·
Replies
18
Views
5K
  • · Replies 13 ·
Replies
13
Views
3K