Linked Questions

11
votes
4answers
8k views

Swap elements in list without copy [duplicate]

I have a lists with 100,000 elements and would like two swap to entries without dublicating the list Example: ...
4
votes
3answers
1k views

Divide column of a matrix by a specific number [duplicate]

Imagine there is a matrix as below ...
7
votes
1answer
15k views

How to add an extra column to a current matrix (list)? [duplicate]

a = {{-800, 1712}, {-801, 1713}, {-806, 1832}} TableForm[a] b = a[[All, 2]] - Min[a[[All, 2]]] How do I make a new matrix (list) whic looks like this ...
7
votes
2answers
2k views

Writing a program to swap rows and columns [duplicate]

I would like to swap rows with other rows or columns. Not for any particular size but for any size. I saw this detailed Q&A but it didn't answer my query. I want to swap multiple rows or columns ...
8
votes
3answers
189 views

Opposite of Part in matrices? [duplicate]

I'm applying a calculation to a block from a 6x6 matrix. I get the block by using Part. For example: ...
5
votes
2answers
140 views

Swaping position in same lists! [duplicate]

I use mathematica 9.0 I tried it often and researched here but i wasnt foundable I have a question about swaping the position of 4 lists in 1 one whole list ...
4
votes
4answers
360 views

Subtracting list from list of same dimensions [duplicate]

This might seem like a basic operation I have already searched for similar answers but found none. I want to subtract the second elements of my list ct from the corresponding element in lt, and ...
-1
votes
2answers
2k views

Convenient methods to sum select rows (or cols) of a matrix? [duplicate]

What are some convenient methods to sum selected rows or columns in a matrix? This question Summing along rows or columns of a matrix only addresses how to sun entire rows or columns ie, by level. ...
-1
votes
2answers
2k views

Rearranging the columns of a matrix [duplicate]

How do I rearrange the columns of a matrix? I really have o idea how to do this. Thankfs for any suggestions!
2
votes
3answers
599 views

Change entire column of matrix using its own elements for calculations [duplicate]

I am aware that there are discussions here about multiplying rows or columns in matrices, but I cannot figure out what to do in the following two cases. I have a matrix, lets say ...
2
votes
2answers
654 views

Adding extra column to an existing table [duplicate]

Suppose I have following table- 1 5 8 2 6 9 3 7 10 0 0 0 Now, I want to add another column by exporting a data file. Suppose contents of that ...
0
votes
1answer
217 views

How to extract data from a list? [duplicate]

I have a long list of coordinates defined in some 8D space. I need to extract the first three coordinates only. How ? For example : ...
2
votes
2answers
121 views

Column Operation - Subtract part of nested list from part of another nested list [duplicate]

I have two lists with x- and y-coordinates with different z-coordinates of the form {{x0, y0, z0_1}, {x1, y1, z1_1}, ..., {xn, yn, zn_1}} and ...
1
vote
1answer
380 views

Extracting second value of each sublist [duplicate]

How can one get the second value of every array inside the outside array? I have the following data data = {{10, 20}, {30, 40}, {50, 60}}; I want to extract ...
0
votes
1answer
262 views

Simple arithmetic operations on elements of a list [duplicate]

How can I shift the first element of a list by 148.38 and the second element by -38.45? The data ...

15 30 50 per page