Linked Questions

7 votes
4 answers
510 views

Consider the following example, which generate two identical arrays. Why sometimes the array is packed and sometimes it doesn't? And why they perform differently? Here the arrays are packed: ...
user0501's user avatar
  • 2,400
13 votes
2 answers
1k views

By using dynamical programming, we can save intermediate steps for recursive relations, as in f[n_]:= f[n] = f[n-1] + f[n-2] However, this only stores ...
freddieknets's user avatar
  • 1,095
6 votes
2 answers
469 views

Let say I need and option for Plot: RegionFunction -> (-6 < #2 < 6 &) But I also want those ...
Kuba's user avatar
  • 139k
7 votes
4 answers
405 views

Is is possible to assign {x = 2, y = 3, z = 4} to a variable var so that one can write ...
u17's user avatar
  • 601
9 votes
2 answers
594 views

If I have a function, that returns a function, for example: f[a_] := a^2 * # & then f[3] == 3^2 # & Is there a way ...
Tom's user avatar
  • 163
11 votes
2 answers
576 views

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 ...
Jacob Akkerboom's user avatar
7 votes
2 answers
4k views

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 ...
Ragnar's user avatar
  • 173
4 votes
2 answers
2k views

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

Seems to me that VerificationTests are a bit verbose: ...
M.R.'s user avatar
  • 31.9k
5 votes
2 answers
375 views

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 ...
kjo's user avatar
  • 11.9k
3 votes
4 answers
288 views

I want to convert {Hold[1 + 2], Hold[3 + 4], Hold[5*6]} into Hold[{1 + 2, 3 + 4, 5*6}]. I have tried ...
expression's user avatar
  • 5,782
3 votes
3 answers
597 views

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 realize ...
JohnD's user avatar
  • 3,381
7 votes
2 answers
240 views

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 ...
saturasl's user avatar
  • 1,429
4 votes
2 answers
228 views

I am working on a project in which I need to dynamically generate CompiledFunctions from Inactive expressions. For example, I ...
David Zhang's user avatar
  • 2,336
4 votes
2 answers
200 views

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: ...
panda-34's user avatar
  • 1,278

15 30 50 per page