Linked Questions

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. ...
user avatar
  • 489
1 vote
0 answers
37 views

How to replace expressions in a `HoldComplete` and then evaluate them? [duplicate]

Example: ...
user avatar
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? ...
user avatar
  • 224k
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 ...
user avatar
3 votes
3 answers
337 views

How to take a part from a list without evaluating it

Consider I have a list l ...
user avatar
  • 123
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: ...
user avatar
  • 7,299
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 ...
user avatar
  • 530
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 ...
user avatar
  • 11
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 ...
user avatar
  • 7,661
8 votes
2 answers
187 views

Syntactic Sugar for TestReports

Seems to me that VerificationTests are a bit verbose: ...
user avatar
  • 30.3k
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, ...
user avatar
3 votes
1 answer
308 views

different situations with Compilation of ConstantArray

First, we load some tools related to Compile for analysis. ...
user avatar
  • 15.6k
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 ...
user avatar
  • 2,458
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 ...
user avatar
  • 1,800
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, ...
user avatar
  • 25k

15 30 50 per page
1
2 3 4 5