Linked Questions

5
votes
2answers
324 views

Overlapping pure functions

Let say I need and option for Plot: RegionFunction -> (-6 < #2 < 6 &) But I also want those ...
9
votes
2answers
357 views

Evaluation in lambda function

If I have a function, that returns a function, for example: f[a_] := a^2 * # & then f[3] == 3^2 # & Is there a way ...
11
votes
2answers
346 views

Setting options of expressions similar to using SetOptions on objects

Introduction I often have the problem that in an expression, I want to change an option. If we are sure the option is not present, we could simply use ...
5
votes
2answers
3k views

Define function using variable list

I have a list of variables variables={a,b} and a list with values values={1,2}. I'd like to define a function using the ...
4
votes
2answers
1k views

Local variables

I'm trying to use Modules together with functions. tmp2 = x^2 + 1; f[y_] := Module[{x = 1}, Evaluate[y tmp2]] This works when ...
8
votes
2answers
163 views

Syntactic Sugar for TestReports

Seems to me that VerificationTests are a bit verbose: ...
3
votes
4answers
182 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 ...
7
votes
2answers
158 views

Method that can be used to collect the variables of a function

Suppose we have a function f[x, y, z] and we want to get all its variables Sequence[x,y,z], what method can we use then? The ...
3
votes
3answers
335 views

HoldForm: how does it interact with nested evaluations?

Here's an example to illustrate the issue I'm having. right = 8 - y; left = y^2 + 6; integrand = HoldForm[Evaluate[right]] - HoldForm[Evaluate[left]] (I ...
5
votes
2answers
252 views

How to silence all messages associated with a built-in symbol?

The post title's pretty much says it all... The reminder of this post just describes the little headway I made with this problem, FWIW. One would hope that ...
4
votes
4answers
194 views

Put local variables for Block in a variable [duplicate]

Is is possible to assign {x = 2, y = 3, z = 4} to a variable var so that one can write ...
4
votes
2answers
145 views

Generating compiled functions from inactive expressions

I am working on a project in which I need to dynamically generate CompiledFunctions from Inactive expressions. For example, I ...
4
votes
2answers
119 views

Choosing an initializer list in With

I'm trying to have several initializer lists in a With function and choose which one I want to use. So far I have this: ...
4
votes
2answers
186 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 ...
3
votes
3answers
152 views

Using a variable to tell Mathematica which existing variable to manipulate

I have an estimation routine I have coded up, I want now to do some tests on it where I pick a particular parameter and run the estimation for differing values of that parameter. What I want is to be ...

15 30 50 per page