The tag has no wiki summary.

learn more… | top users | synonyms

21
votes
2answers
672 views

Why there is no name for #1@#2&?

Why does the pure function #1@#2& have no name? Is it due to the way Mathematica works, or is it "just because"? I'm asking because I find inelegant to write ...
0
votes
2answers
152 views

Unwrapping a list when invoking a function [duplicate]

The minimal working example of my problem is as follows: l = {1, 2, 3, 4} f[a_, b_, c_, d_] = a + b + c + d Now, I'd like to evaluate ...
0
votes
3answers
93 views

How can I generate a generalized product to two lists in a special way? [duplicate]

Let's say I have two lists, and I'd like to generate a "cartesian product" from these two. Specifically Inputs: A = {{{1}}, {{2}}, {{1}, {2}}}; B = {8, 9}; ...
2
votes
0answers
151 views

Lazy evaluation/loading of parts of an expression

Is it possible to have an expression x such that its elements are only evaluated when they are individually accessed, for example when evaluating statements like ...
6
votes
2answers
272 views

Why are we so sure about Map results?

I do abuse it often but when I have faced this feature first time I was really suprised: i = 0; (i++; # - i) & /@ Range[5] {0, 0, 0, 0, 0} What am I ...
16
votes
1answer
142 views

Help understanding overloading of Atomics within Block

Usually h @@@ {f[1, 2], f[3, 4]} === {h[1, 2], h[3, 4]} but this is not the case when f is ...
3
votes
2answers
132 views

What is the fastest way to get a list of subexpressions and their positions?

I have spent quite some time trying to figure out what the fastest way is to get a list lists of all subexpressions and their positions. I have tried things with MapIndexed, which seems ideal in cases ...
14
votes
3answers
164 views

What does `: Hold[$IterationLimit]` mean?

In this answer, what does the : Hold[$IterationLimit] part of the following construct do? ...
0
votes
1answer
68 views

Substituting Data from File

I have sets of Diff. Eq. that I'd like to solve symbolically, then substitute in numerical values for some of the symbols. I'd like to store the value for each symbol in a file, e.g., an excel ...
8
votes
3answers
188 views

Functions that creates symbol in a specific context

I'm trying to make a function f that takes a symbol, a value, and a context, and creates the symbol in the requested context and assigns it the passed value. The ...
5
votes
1answer
270 views

Proper use of arbitrary number of variables

So, I'm working on a project where the number of independent variables is not fixed. Consider a problem of $N$ independent variables, $\boldsymbol{r}$. I want to perform different things with them. ...
1
vote
0answers
71 views

Defining a Function, := versus = [duplicate]

Consider: ...
4
votes
1answer
416 views

Behavior of expression evaluation in Plot

I'm confused with Mathematica's way of parsing expressions. I've been struggling with this for a while and never found an exhaustive answer, sometimes things don't parse the way I think they would ...
9
votes
2answers
2k views

What does # mean in Mathematica?

I asked Mathematica to compute the following Solve[c (1-x)^2-x^(1/4) == 0, x] and it returned this: x = Root[#1^8 c^4 - 8 #1^7 c^4 + 28 #1^6 c^4 - 56 #1^5 ...
1
vote
2answers
69 views

Factor inside argument

How do you use Factor so that it will factor expressions inside the arguments of some bigger expression. For example Factor[ Cos[t w - t z]] gives ...
16
votes
3answers
313 views

What does None mean in a control specification for Manipulate?

I am now struggling to understand code that contains the following (simplified) Manipulate structure. ...
0
votes
0answers
63 views

Mathematica Workspace [duplicate]

Possible Duplicate: Is there equivalence within Mathematica to view currently used variables similar to Matlab? In Matlab, I can type: ...
13
votes
3answers
342 views

Make mathematica treat $e_i^2$ as numeric

With NumericQ[symbol] = True, I can declare that a symbol is numeric. I want the expressions matching: $$e_{\text{i$\_$}?\text{IntegerQ}}^2$$ to be treated as ...
18
votes
1answer
430 views

Using Transpose with a list as the second argument

I'm having difficulty understanding the Transpose function. I know what the transpose of a matrix is, not a problem, and I see that applying the ...
2
votes
1answer
133 views

Difference between function definitions [duplicate]

Possible Duplicate: Functions vs. patterns I thought about describing the context in which I faced this problem, but I figured it is general enough and clear enough to pose it as it is. ...