Linked Questions

14 votes
2 answers
567 views

On trying to write this answer I reached the frustrating realization that I didn't have an efficient way to delete a list of columns or deeper level components in a simple way as ...
rhermans's user avatar
  • 37.7k
5 votes
2 answers
641 views

{{1, 2}, {2, 3}, {5, 4}} I tried to do this: Drop[#, {2}] & @@ {{1, 2}, {2, 3}, {5, 4}} but it gave {1} but what I want is {{1},{2},{5}}
user62264's user avatar
4 votes
2 answers
1k views

We have data in a list called megadata where megadata[[1]] for instance are the temperatures of each data point, ...
user18537's user avatar
2 votes
2 answers
131 views

Gday guys. This problem troubles me, and I hope you can help me solve it. Say I have two random lists L1={{2},{5},{1},{0},{4},{7},{8}} L2={2,5,1,0,4,7,8} and ...
user11726's user avatar
  • 115
208 votes
15 answers
77k views

Question The Mathematica tutorial has a section 'Basic Matrix Operations', describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...
sjdh's user avatar
  • 7,917
15 votes
3 answers
22k views

I start off with m = 1000 x 5 matrix, and I would like to remove first column to get 1000 x 4 matrix and repeat again for ...
sebastian c.'s user avatar
  • 1,993
18 votes
7 answers
3k views

I'm looking for a way to reduce a binary matrix containing zeros at some positions into a matrix that contains no zeros by deleting rows and columns of the original matrix until only non-zero values ...
tavr's user avatar
  • 181
15 votes
3 answers
2k views

It often happens that I'd like to know which of two or more alternative expressions (that should evaluate to the same value) is fastest. For example, below are three ways to define a function: ...
kjo's user avatar
  • 11.9k
5 votes
3 answers
5k views

How do I drop the first/last row or first/last column from a matrix? The general case is answered here but I am new to Mathematica and it the arbitrary case is unnecessarily complex. Suppose I am ...
Hirek's user avatar
  • 483
6 votes
3 answers
292 views

Delete is not suitable to delete the rows of a matrix, as illustrated below: ...
kjo's user avatar
  • 11.9k
11 votes
1 answer
618 views

I have an application where I need to drop some arbitrary list of columns from a ragged array (where of course the shortest array rows have at least all the specified columns). E.g., given a ragged ...
ciao's user avatar
  • 26k
3 votes
3 answers
732 views

Thank you for looking and answering this question. I am trying to create a new matrix from an old one. Meaning, I have a original matrix that's 20x20. I want to keep the first five lines of the matrix,...
user2558894's user avatar
3 votes
2 answers
3k views

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 ...
solphy101's user avatar
  • 347
3 votes
3 answers
214 views

I have some large matrices, which I need to remove the first row and first column (both of which are full of zeroes). In this sense I need the inverse of "ArrayPad". For example, consider the matrix: ...
Nigel1's user avatar
  • 795
2 votes
1 answer
429 views

m={{a, b, c, p}, {d, e, f, x}, {g, h, k, z}, {u, v, w, y}}; I want to swap 1st and 2nd rows by 4th and 3rd rows respectively. And then, swap 1st and 2nd columns ...
santosh's user avatar
  • 613