Linked Questions
63 questions linked to/from Injecting a sequence of expressions into a held expression
7
votes
1
answer
134
views
How to define a version of Table[] which localizes iteration variable by Module[]?
For reusable code it's good practice to use Module[] to localize iteration variables used by Table[], as explained by this post.
...
1
vote
0
answers
37
views
6
votes
1
answer
145
views
Convert between string and expression representation of boxes
Boxes may be represented as expressions or as strings. How can I convert between the two forms? In particular, how can I convert from the string representation to the expression representation?
...
2
votes
3
answers
84
views
Function of a function, both of a list of variables
I am trying to avoid dealing with long explicit lists of variables.
What i do so far is the following:
VarList={x_, y_};
ParList={x, y};
ValList={2, 3};
What ...
3
votes
3
answers
337
views
How to take a part from a list without evaluating it
Consider I have a list l
...
15
votes
2
answers
516
views
Why can't I inject expressions in Compile using (only) With
Generally speaking, With can be used to inject into arbitrarily held expressions, for example:
...
3
votes
2
answers
159
views
HoldFirst and Hold expression as argument
I store a reference to the association in a held expression in a variable:
a=<||>;
b=Hold[a];
And in the code, I want to do manipulations with the original ...
1
vote
1
answer
127
views
How to get LogPlot to accept a Sequence for its Min/Max Limits [duplicate]
If you use Plot like this,
Plot[Sin[x], {x, 1, 5}]
it produces the correct Sin graph ...
3
votes
1
answer
344
views
Generate assignment code to symbols from string
I want the function to take in string, then assign a value to its corresponding symbol. An implementation using ToExpression is
...
8
votes
2
answers
187
views
Syntactic Sugar for TestReports
Seems to me that VerificationTests are a bit verbose:
...
19
votes
3
answers
931
views
Generating assignments and transforming code inside held forms when generating code
I have been playing with slightly above trivial code manipulations in Mathematica. I thought Mathematica would be great for this kind of work because of rule replacement and expression manipulation, ...
3
votes
1
answer
308
views
different situations with Compilation of ConstantArray
First, we load some tools related to Compile for analysis.
...
1
vote
1
answer
175
views
Overriding the behavior of Dot
I would like to override the behavior of Dot, so that Dot[u,v] will return a scalar instead of a 1x1 matrix in the case that the ...
4
votes
2
answers
192
views
How can I use sequence in plotting domain?
I would like to plot a function but have a domain defined elsewhere as follows:
xrange = Sequence[0, 2π];
Plot[Sin[x], {x, xrange}]
However, this doesn't work ...
14
votes
7
answers
857
views
How to properly inject iterators into table? [duplicate]
Goofing off on a prior question, I was fiddling with other methods, which led me to the need to inject a constructed set of iterators into a table construct.
Now,
...