Linked Questions

15
votes
2answers
503 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: ...
16
votes
4answers
2k views

Splicing a list of arguments into a function with Sequence

Not sure if this has been asked, but I have a fairly simple operation that I don't know the syntax for. Say I have an array with some values, and a function f that accepts an arbitrary number of ...
3
votes
4answers
199 views

Operations on expressions within Hold

I want to convert {Hold[1 + 2], Hold[3 + 4], Hold[5*6]} into Hold[{1 + 2, 3 + 4, 5*6}]. I have tried ...
3
votes
2answers
150 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 ...
22
votes
2answers
1k views

How to inject an evaluated expression into a held expression? [duplicate]

I know that there are methods to structurally manipulate held expressions (discussed e.g. here), but I failed to apply those for this particular problem: ...
43
votes
4answers
4k views

Function in Table

I need a table with the elements made of pure functions and list elements. This is a simplified example: I need a list as: ...
20
votes
6answers
7k views

How to completely delete the head of a function expression

Is there any way to completely remove the head of an expression function? For example, how would I remove the head Cos from ...
1
vote
1answer
113 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 ...
4
votes
2answers
190 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 ...
19
votes
3answers
917 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
1answer
325 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
2answers
180 views

Syntactic Sugar for TestReports

Seems to me that VerificationTests are a bit verbose: ...
14
votes
7answers
844 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, ...
3
votes
1answer
295 views

different situations with Compilation of ConstantArray

First, we load some tools related to Compile for analysis. ...
1
vote
1answer
161 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 ...

15 30 50 per page