Skip to main content

Questions tagged [evaluation]

Questions about how Mathematica evaluates expressions, tracing evaluation (Trace*), handling expressions in unevaluated form (Hold*, Unevaluated), nonstandard evaluation, etc.

149 votes
7 answers
191k views

Is it possible in Mathematica to get a step-by-step evaluation of some functions; that's to say, outputting not only the result but all the stages that have led to it? If so, how does one do it? ...
Cydonia7's user avatar
  • 2,569
112 votes
4 answers
18k views

This example comes from the Mathematica documentation for Plot under Basic Examples. Can someone please explain why these are each plotted as a different color in ...
trayres's user avatar
  • 1,245
107 votes
5 answers
7k views

I wish to make a replacement inside a held expression: f[x_Real] := x^2; Hold[{2., 3.}] /. n_Real :> f[n] The desired output is ...
Alexey Popkov's user avatar
96 votes
6 answers
5k views

WReach has presented here a nice way to represent the Mathematica's evaluation sequence using OpenerView. It is much more clear way to go than using the standard <...
Alexey Popkov's user avatar
70 votes
10 answers
4k views

Consider the following toy example: Hold[{1, 2, x}] /. x -> Sequence[3, 4] It will give Hold[{1, 2, Sequence[3, 4]}] ...
Szabolcs's user avatar
  • 239k
68 votes
4 answers
6k views

I am looking for a simple, robust way to evaluate an expression only one step, and return the result in a held form. The definition of a single step is ambiguous, and this itself is probably worthy ...
Mr.Wizard's user avatar
  • 275k
59 votes
6 answers
7k views

This frequently happens to me. I'll have some code, execute it, and realize it's taking a long time. My PC isn't frozen, and Mathematica itself isn't even frozen: I can select stuff in the notebook, ...
YungHummmma's user avatar
  • 3,132
57 votes
2 answers
3k views

SubValues, as discussed in a previous question, are declared as follows ...
rcollyer's user avatar
  • 34.3k
51 votes
6 answers
5k views

I am trying to convert a list of string names into symbols, which will then be used to store data. I have 24 files (where the name of each file is a member of the list mentioned above) that I need to ...
Todd Allen's user avatar
  • 2,274
45 votes
2 answers
8k views

I need to evaluate the efficiency of my code. Therefore I would like to evaluate the time the code need for some calculations. Mathematica gives me two possibilities for this kind of evaluation: <...
John's user avatar
  • 4,431
42 votes
4 answers
3k views

Is it possible to find the values of variables of a running Mathematica evaluation, without interrupting it? For example, suppose I do: Do[Pause[1]; a++, {50}] ...
Carl Woll's user avatar
  • 133k
40 votes
3 answers
9k views

When one evaluation is running, if I want do another evaluation, Mathematica will put the second one in the queue and run it after the first evaluation finish. However, the first evaluation may take ...
user avatar
40 votes
4 answers
2k views

Bug introduced in 9.0 or earlier and persisting through 12.0 In 11.3 it is even worse. An example from the accepted answer with a Slider is now broken too: ...
Kuba's user avatar
  • 139k
37 votes
3 answers
1k views

This is a bid at creating a canonical Q&A. Many questions have been asked that come down to the fact that Thread evaluates its first argument before threading ...
Mr.Wizard's user avatar
  • 275k
36 votes
1 answer
4k views

It is not completely clear to me how Return[] works. The documentation says: Return[expr] returns the value expr from a ...
Szabolcs's user avatar
  • 239k

15 30 50 per page
1
2 3 4 5
110