# Search Results

Results tagged with Search options answers only user 12
13 results

How to manipulate expressions structurally, not necessarily complying with the rules of algebra.

This is not about parsing, it's about evaluation. Consider f[Sequence[1,2]] which evaluates to f[1,2], and compare with f[#]&[Sequence[1,2]] which first evaluates to f[#]&[1,2] then to f[1 …
answered Feb 11 by Szabolcs
The reason for this behaviour is that Module does localization by renaming. For example: Module[{x}, x] (* x$982 *) That x inside Module is renamed to something like x$nnn with nnn being a differe …
answered Aug 17 '14 by Szabolcs
expr = K == 2.7536 || K == 4.6917 || K == 6.3913 || K == 8.3237 K /. {ToRules[expr]} Be aware that K is a built-in symbol and avoid assigning values to it (otherwise obscure things will get broken) …
answered Oct 3 '17 by Szabolcs
answered Oct 27 '15 by Szabolcs
There are multiple ways. You can return Nothing instead of the default Null. polynomials = Table[ If[i + k == 6 && j + l == 4, Subscript[p, i, j]*Subscript[p, k, l], Nothing …
answered Nov 16 '16 by Szabolcs
There's no single BoundedQ function that I know of, but there are several related functions: FunctionRange tries to compute the range of a function: range = FunctionRange[1/x, x, y] (* y < 0 || y > …
answered Jul 20 '15 by Szabolcs
@corey gave the obvious answer in the comments. That is the way I would usually use. If you are completely new to programming, I recommend: https://www.wolfram.com/language/elementary-introduction …
answered Dec 15 '16 by Szabolcs
I think this is the simplest fast way to convert an atomic expression to an equivalent compound form, to be able to inspect and manipulate its "apparent" full form: g = RandomGraph[{5,8}]; (* this is …
answered Oct 18 '15 by Szabolcs
This is indeed somewhat confusing when you are new to Mathematica. In Mathematica, == stands for mathematical equality. Thus a == 0 does not evaluate to either True or to False until a is replaced b …
answered Jul 30 '15 by Szabolcs
In a practical scenario, you may be storing your expression in a variable. To be able to do so, it must be held unevaluated. expr = Hold[Plot[x, {x, 0, 1}]] (* Hold[Plot[x, {x, 0, 1}]] *) Then you …
answered Oct 12 '17 by Szabolcs
I'm going to take this as a general question, referring to all atomic objects, not just DelaunayMesh. By design, atomic objects like DelaunayMesh, SparseArray, Graph, etc. or even Association and Rat …
answered Oct 9 '15 by Szabolcs
This is related to the Orderless attribute of Times and Plus. These attributes could be removed permanently with some hacks, but that would break Mathematica. If you only want to display the result …
answered Jan 30 '16 by Szabolcs
No, this is not possible. A cell can only be evaluated if it contains a complete and syntactically correct expression. You might want to try Code style cells (Alt-8 or Command-8) which contain plain …
answered Apr 15 '14 by Szabolcs