Linked Questions

1
vote
1answer
173 views

Sort rows in a matrix with a vector [duplicate]

Let's suppose I have a matrix: $A=\left[\begin{array}{ccc} a & b & c\\ d & e & f\\ g & h & i \end{array}\right]$ and I want to sort the rows using a sort-vector: $sortVec=\...
1
vote
0answers
148 views

Sorting Eigensystems [duplicate]

SO I have this code: ...
1
vote
0answers
36 views

Manipulate arrays [duplicate]

I want to sort the array a = {{{1, 0, 0}, {1, 1, 1}, {0.5, 0.0, 0.5}}, {{-1}, {1}, {-1}}} in the following way: a[[1]] and <...
453
votes
37answers
99k views

What are the most common pitfalls awaiting new users?

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...
14
votes
13answers
747 views

How to group each element with each consecutive elements in one head

Suppose I have the following list: list = {a, b, c, d} I want to generate this result: ...
13
votes
4answers
1k views

I have the minimum Y value. I want to find the corresponding X value from the list [duplicate]

I have a very big file and contains data in the format of {x,y}. I got the minimum Y value by using data[[All, 2]] // Min[#] & Now I want to get the X value ...
13
votes
6answers
887 views

Sort+Union on a list

Probably this is too trivial question for this forum but for some reason I am not getting it on my Mathematica 7 so far. I have a list ...
6
votes
6answers
461 views

Sort a list of coordinates by frequency from first component of each coordinate

The situation is that I have a List like this: ...
7
votes
2answers
468 views

Finding the two pairs in a list of pairs that minimize and maximize a given function

I need to declare a list of ordered pairs, and with it I need to declare a function of two variables, say x and y, and print ...
2
votes
3answers
2k views

Maximum tuple value

Is there a simple way to make a maximum tuple value (similar to python)? For example, in python max([ (1,2), (1,3), (3,1), (4,0) ]) returns ...
5
votes
3answers
376 views

Is there a function that compares two lists and take from first the element with the position of largest value at second?

Is there a function in Mathematica that compares two lists and take from first the element with the position of largest value at second: ...
2
votes
1answer
2k views

How do I sort complex numbers?

Okay, so I posted something about sorting, and it was linked as a duplicate to This post However, I am having problems trying to sort a list that contains both real and complex numbers. I put them ...
3
votes
2answers
267 views

Exercise using Sort

I have to order the following list according to the sum of the powers of each element of the list, using the function Sort. ...
14
votes
1answer
281 views

Dataset is 20X slow when adding column heads

I'm trying to use Dataset to explore some large data. I notice that the performance decrease more than 20X by adding heads to the columns. Here is an example: We ...