Linked Questions

1 vote
1 answer
68 views

How to use syntax instead of double for loop

I would like to find the distance between a point list (i.e dalist) and list of centers (i.e framecenters). I used the following ...
Mehdi Ebadi's user avatar
5 votes
1 answer
242 views

Why Cases and Select treat the List differently?

Look at these two examples: In[1]:=Select[f[i], MatchQ[_f]] Out[1]:=f[] In[2]:=Cases[f[i],_f] Out[2]:={} It seems that the Select take $f[i]$ as List, but Cases ...
XiaoaiX's user avatar
  • 397
1 vote
1 answer
60 views

Head of level : question about the Apply function

I am not sure to really understand how the function Apply works at level 2 for example. I have read this question and few others and it doesn't help me :Levels: how do they work? Take the following ...
StarBucK's user avatar
  • 2,164
3 votes
2 answers
154 views

What exactly do single brackets represent syntactically?

I'm trying to deepen my understanding of the mathematica language after having messed around with it for a long time. I'm reading the book "mathematica programming Intro". Unfortunately, I don't ...
user56834's user avatar
  • 545
4 votes
6 answers
2k views

Creating a third list from two given lists [duplicate]

I imported 2 lists of the form {{x1,y1}, {x2,y2}, ...} and {{x1,y'1}, {x2,y'2}, ...} into Mathematica. I want to make a ...
Shawn's user avatar
  • 41
0 votes
0 answers
145 views

Indicate level with Replace [duplicate]

Replace[{{x^2, Sqrt[x]}, {x + 1, x - 3}}, f_[x__] -> f, 1] Level 1 of Replace works here as expected with output {List,List} ...
GambitSquared's user avatar
0 votes
0 answers
45 views

Understand the notion of level with apply [duplicate]

There is something I don't understand with the notion of levels with apply. I take this example : Apply[f, {{a, b, c}, {d, e}}, {2}] Mathematica answers me : <...
StarBucK's user avatar
  • 2,164
2 votes
1 answer
82 views

Higher functional programming partial substitution

This h[g_, x_] := g[x] h[Sqrt, x^2] works obviously as well as : f[x_]:= x^2 h[f,x] but if ...
cyrille.piatecki's user avatar
1 vote
2 answers
381 views

Extract all elements from a list that belong to a set or have a set element as an argument

EDIT: Added that I want to extract not only the variables from a specific set, but also functions involving variables from a specific set. Given the set ...
Martin's user avatar
  • 21
10 votes
2 answers
353 views

Position with test for list of lists [duplicate]

Why do I get this error message? It seems to me that the level specification should have done the job. ...
Al Guy's user avatar
  • 1,610
13 votes
1 answer
354 views

Mapping on leaves

Say I have some nested structure, such as {a,{{b,c},d,{e,{f,g}}}}, and I want to apply a function $q$ to each of the leaves; that is, I want the output to be ...
rogerl's user avatar
  • 4,209
7 votes
5 answers
937 views

How to Apply Functions to Lists with Many Curly Brackets?

For example, consider the list defined below. samplelist = {{{1,2,3,4}}, {{5,6,7,8}}}; How would I apply the Times operator ...
user155812's user avatar
8 votes
4 answers
681 views

Extract all Values from nested Association

Considering we have an Association: ...
Michiel van Mens's user avatar
6 votes
2 answers
242 views

Levelspec range with negative levelspec

Documentation states A negative level -n consists of all parts of expr with depth n. However, it is not clear what do level ...
akater's user avatar
  • 1,540
0 votes
0 answers
62 views

Where can I find mathematica documentation about @@@? [duplicate]

For example, to build a rule from 2 lists {a,b,c}, {1,2,3}, I use: ...
Hergé's user avatar
  • 73

15 30 50 per page