2k 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: ...
148 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 ...
1k 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. ...
822 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 ...
161 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 : ...
83 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 ...
99 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 ...
99 views

### List operation on specific elements [duplicate]

Let's consider two tables given by T1 = Table[{i,j,f1[i,j]},{i,0,2},{j,0,3}]; T2 = Table[{i,j,f2[i,j]},{i,0,2},{j,0,3}]; The functions ...
81 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 ...
58 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!
64 views

### Manipulating lists with constant values [duplicate]

let us assume we have some data in the following form. Table[data[[1,i,{1,2}]],{i,1,Length[data[[1]]]}] This would give all $x-y$ pairs of the first file. What I ...
48 views

### Multiplying columns with factor [duplicate]

If I have a matrix matrix=Table[RandomInteger[],{i,3},{j,3}] And I multiply it with vector={1,3,5} All three rows change ...
54 views

### Construct matrix B from columns of matrix A? [duplicate]

Starting with Mathematica and working with matrices, I am looking for a way to construct a new matrix B from columns of matrix A. For example, matrix a has 8 columns and 4 rows, I want matrix B to be ...