Linked Questions

2 votes
1 answer

Is the use of Block to temporarily override definitions inherently unsafe? [duplicate]

This may have been discussed before, if so, please let me know. Consider the following example: x = 5 Dynamic[{Clock[], x}] This will always display the ...
Szabolcs's user avatar
  • 233k
598 votes
19 answers

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
211 votes
25 answers

What are some useful, undocumented Mathematica functions?

There have already been some questions about some undocumented functionality in Mathematica. Such as (please add to these lists!) How can one find undocumented options or option values in Mathematica?...
19 votes
4 answers

Internal DynamicModule steals scope of external DynamicModule

I have two dynamic objects, one nested in the other. Both have their own functions defined, as follows. I have simplified them to the point where they don't make much sense, but can still illustrate ...
István Zachar's user avatar
8 votes
2 answers

How to replace a variable that was assigned a value before

Question How to make the replacement $f[x] \to f[y]$ for an abitrary function $f$ if $x$ was assigned a value before? Example 1 How can I make the replacement $x +1 \to y + 1$ if I have assigned ...
sjdh's user avatar
  • 7,617
11 votes
2 answers

Is there a convention on which name to use for a throwaway variable? (Like underscore in Python) [duplicate]

I would prefer to write {_, foo} = LongFunctionName[arg1, arg2] instead of foo = LongFunctionName[arg1, arg2][[2]] or ...
ZeitPolizei's user avatar
8 votes
1 answer

DSolve with SetOptions[Solve, Method -> Reduce] Behaving Differently in Ver 11.1.1

With version "11.1.1 for Microsoft Windows (64-bit) (April 18, 2017)", DSolve[{SI'[s] == Sin[PH[s]] , PH'[s] == Sin[SI[s]]/e}, {SI[s], PH[s]}, s] produces the ...
bbgodfrey's user avatar
  • 60.8k
7 votes
1 answer

ReplaceAll inside an Iterator

I'd like to apply a set of rules to an expression defining the iterators of the table, like this: ...
qdot's user avatar
  • 173
8 votes
1 answer

Dynamics and Block interfere

As mentioned by Albert Retey in a comment, we can unintentionally interfere with our dynamics as follows ...
Jacob Akkerboom's user avatar
22 votes
0 answers

Documentation of the frequently-used functions in the context of Internal` and Compile` [duplicate]

In this site, I have gradually found out that there is a collection of functions in all kinds of answers. For instance, Compile`GetElement, ...
1 vote
1 answer

Weird behaviour of If inside of Block definitions?

I am on Mathematica 9 and I have discovered, that, when I use If inside of the definitions of the Block variables, then other, ...
Wauzl's user avatar
  • 213
1 vote
0 answers

Dynamic fails to update after evaluating `Pause[]` within `Block` [duplicate]

When evaluating this, the final value of a is 0 as it should be, but Dynamic[a] shows a <...
Coolwater's user avatar
  • 19.9k