Questions tagged [evaluation]
Questions about how Mathematica evaluates expressions, tracing evaluation (Trace*), handling expressions in unevaluated form (Hold*, Unevaluated), nonstandard evaluation, etc.
1,637 questions
2
votes
1
answer
145
views
Receiving messages quietly
I recently learned about the possibilities of EvaluationData, and would like to analyse for example
the behavior of NIntegrate.
...
0
votes
0
answers
75
views
How can I run cleanup code automatically at the end of an evaluation (without wrapping the code)?
I would like to invisibly open a notebook, return the notebook object, use it in subsequent intermediate evaluations within the active overall evaluation, and then close the notebook object at the end ...
0
votes
0
answers
99
views
Plot shows expected curve, but expression cannot be evaluated
I have the following expression in Mathematica:
...
7
votes
1
answer
308
views
Prevent equation involving units from evaluating to True
If I evaluate the expression below, output is True as expected. However, is there a neat way to get an intermediate result as shown below without fully evaluating ...
1
vote
4
answers
255
views
`With` with auto-generated local variables
The strange goal
I want to do something like this
...
4
votes
1
answer
124
views
Evaluating series with functions as coefficients results in Power::indet
Mathematica seems to have a problem evaluating a series in which the coefficients are functions. Here is an example.
...
14
votes
1
answer
418
views
Strange behaviour of Unevaluated
I don't really understand why we get different results below
x=10;
(* return 1 + Unevaluated[x] *)
Plus[1, Unevaluated[x]]
(* return 11 *)
Plus[Unevaluated[x], 1]
...
3
votes
2
answers
207
views
Using Trace with TraceDepth
Regarding TraceDepth with TraceDepth->3,it
seems that {{{fib[1]}}} is also 3 level deep, ...
3
votes
3
answers
306
views
Can ContourPlot handle variables defined as part of a list?
The following code works fine
...
0
votes
0
answers
66
views
Skip evaluation of some section
I’m using Section and Subsection styles in a Mathematica Notebook to organize code. I want to control whether Input cells under ...
5
votes
4
answers
258
views
How to define a constructor-like simplification for symbolic types without causing recursion?
I would like to define a data representation SomeHead[l, r], where the constructor automatically returns a simplified or normalized form. The simplification process ...
0
votes
0
answers
53
views
Evaluate cell between two tagged cell
How can I evaluate cells between two tagged cells in a notebook that has many cells, especially when I need to debug specific sections?
Alternatively, how can I stop evaluation at a particular cell ...
4
votes
2
answers
241
views
Using Defer to print variable name in a function
If I run the following code
test = 3.14
Print[Defer@test]
it prints the name test. Similarly, ...
1
vote
1
answer
94
views
Force NDSolve to numerically evaluate a function that returns a list
I want to solve a system of ODEs that has a variable number of equations. The following is a MWE that works:
...
6
votes
3
answers
201
views
Associations in replacement rules variable
I have a large number of replacement rules where the right hand side (RHS) is always the same. To avoid repetition, I separated the two sides to add the same RHS to all of them.
This is a minimal ...