# Tagged Questions

Questions on the manipulation of matrices in Mathematica.

174 views

### Randomly changing matrix entries

Write a block of code that generates a 4x4 matrix with randomized real number entries each between 0 & 1, then selects 3 matrix entries at random, and finally replaces these 3 entries with a "...
116 views

### Submatrix with linearly independent columns

What I want is the submatrix where all the linearly dependent rows have been eliminated. I tried implementing this solution, but it doesn't work in the following example: ...
235 views

### Quick way to tell if matrix is integer-only?

What's the most shortest one-liner code to tell whether a matrix is integer-only? I've come up with: Length@Cases[A // Flatten, _?(Not@*IntegerQ)] == 0 but isn'...
73 views

### Exporting mixed data of matrices and vectors / lists

thank you for reading my question. I have a problem trying to export mixed data from Mathematica. I have different matrices and vectors, which should be combined to a output file. Here a minimal-...
147 views

### Neighbourhood - Calculations

SeedRandom[0]; n = 5; (m = N @ RandomInteger[{1, 3}, {n, n}]) // MatrixForm result1 = MeanFilter[m, 1] // MatrixForm ...
3k views

### Division by zero is slow

Suppose I have two arrays of data, which I want to divide: ...
2k views

### how to diagonalize this symbolic matrix?

m = {{0, 0, w}, {0, t, -w}, {w, -w, r}} use equation P^(−1)A P, how to obtain P with Mathematica? Thanks!
180 views

### An efficient way to compare two matrices

I have two matrices mat1 and mat2, both are results from different algorithms that are supposed to calculate the same result. The nmax is around 300, the q varies from 0.001 to 1. ...
486 views

### How to extract a part of matrix satisfying certain condition(s)

I have a following matrix ...
62 views

### Automatically discover the class of an arbitrary matrix

In Wolfram|Alpha it is possible to discover some specific classes to which a matrix belongs. For instance, typing this in Wolfram|Alpha ...
197 views

### A Product function for matrix products

I would like to use an equivalent of the product-function in mathematica, but where instead of multiplying numbers I multiply matrices?
160 views

### Programming for matrix manipulation

I want to write a programme which operates on nd x nd matrices. The programme looks the matrix as a n x n block matrix where ...
212 views

### Returning the 3-dimensional vector from a skew symmetric matrix

I'm trying to write a function that takes in a skew symmetric matrix and returns the corresponding vector. When I write the following code, it works when I leave it as variables, but it does not work ...
102 views

### Display problem multiplying matrix [duplicate]

I'm multiplying matrices and I don't get answer I want I just get matrix M times matrix N, there is no result. What to do and ...
154 views

### Replace part in a matrix that matches specific pattern

I have the following problem. Given a matrix L which looks as follows, Matrix L is a link, route matrix. Further, I got the following vector (d), which indicates the demand per vertex combination. ...
92 views

### Calculating eigensystem of a matrix containing very small numbers [duplicate]

I'm dealing with a matrix containing very small numbers like 10^(-370). When I compute the eigensystem of my matrix, it takes too much time, though the matrix size is not large. Can anyone explain ...
79 views

...
58 views

### Verticepair - route matrix

I have the following problem. I have two lists: list1 defines all possible commodities in a network g. E.g. Form vertex 1 to ...
179 views

### Mapping a function of the form matrix[[row,column1;;column2]] over a list

I want to create a list of lists of values by mapping values[[row, col1;;col2]] over a list like {{r1,c1,c2},{r2,c2,c3},... } to ...