Tagged Questions

Questions on the manipulation of matrices in Mathematica.

383 views

converting between forms - symbols/subscripts - matrix products

If I have a vector of the form (xp+y, x+yp) do you have a simple way of creating the following matrix and vector from it: {{p, 1}, {1, p}} * {x, y}, such that ...
514 views

Listing matrices up to symmetry

I am interested in the equivalence relation on N x N binary matrices, in which two matrices are equivalent if one can be obtained by rotating/reflecting the other. I would like to obtain a list ...
461 views

correct way to map a function on entries down the pages in a 3D matrix?

updated: added another method to the methods I tried below for completion. This is new way of doing it, but most likely not very efficient, did not time it I can only visualize 3D matrices in my ...
198 views

Creating simple table

How do I create a table like this? I find it very hard to create the zero-row and zero-column. Edit: I am looking for a solution where a formula eg. Table or something else is being used. I can ...
248 views

How to use adaptive precision in matrix computations?

I wish to compute the pseudo inverse of rectangular (or square) matrices by the cubically method of Chebyshev given by $X_{k+1}=X_k(3I-AX_k(3I-AX_k))$ where $X_0=\frac{1}{\|A\|_F^2}A^*$. The procedure ...
240 views

Construct an infinte matrix with finite sub-matrices

How can I construct an infinite matrix with finite sub-matrices of the form A = (B0, 0, B1 0, B2, 0 0, 0, B3) where each Bi is a rectangular or a ...
609 views

RowReduce for symbolic matrices

I'd like to invoke RowReduce on some matrices with a time parameter. For example consider A = {{1, 0}, {0, t}} If ...
408 views

Assigning row of values to a lower triangular matrix

I want to assign a linear row of values to the elements of a lower triangular matrix, i.e., if the row of values is {1,2,3,4}, then the matrix (4 X 4) should be: ...
471 views

204 views

Sorting a list of triplets by first element of each triplet fails

In the last line of code, I´m trying to order the matrix by the first column. I want to store in the Array t2tlistsorted ( 100 x 3 ), but I can´t. ...
1k views

How can I visualize 6 square matrices as a cube?

I have six square matrices of the same dimensions in a list, for example: ...
80 views

Basic Row Traversal Question

Right now I'm using this For loop to do an operation to each row of a $n \times n$ matrix, I was trying to figure out how to do this with ...
194 views

Finite precision - how to get rid of “near zeros” [duplicate]

I am performing a finite-precision operation on a matrix A which I know precisely; call the result B. The operation is taking ...
295 views

Need an efficient method for finding certain matrices

I am trying to write a function which produces square matrices with certain characteristics. The function should have two inputs: number of the rows, n number of ...
197 views

Output to preserve dot product

I am fairly new to Mathematica and I am faced with a problem. I tried to search for the solution but it seems that I don't know how to formulate the short search request. I need to perform a matrix ...
38 views

Eigenvalues for large matrices without Root-Solution [duplicate]

I read some other questions and tried to implement the given answers but yet, I did not succeed to find proper solutions for my eigenvalues. I hope someone can show me how to do this for this case, ...
117 views

NMaximize with matrix input

I defined function f[x_, fixed_] := {...}. Here x is an $M\times N$ matrix. I want to maximize $f$ with respect to $x$. I have ...
232 views

Hermite Normal Form in “columns” convention

After describing the Hermite Normal Form (HNF), MathWorld explains: The Hermite normal form for integer matrices is implemented in Mathematica as ...
266 views

Most efficient way to sum over matrix products?

I have two lists. The first, coefficientlist, is dense and has dimension {176,176} elements. The second, ...
677 views

Analytically solve the eigenvalue problem with infinite dimensions by Mathematica?

If I am given a symbolic expression of all the matrix elements in an infinite-dimensional space, e.g., the Hamiltonian of a quantum mechanical system, is it possible to get the symbolic expression for ...
720 views

How to find the position of non consecutive numbers?

Given a sorted table, how can I find the position of non consecutive numbers in the first column of the table? ...
109 views

PermuteSubgraph not working? (Combinatorica)

I am trying to write a code to perform the QAP partialling analysis (here's a paper to know more) but the part in which I "scramble" the graph with PermuteSubgraph does nothing, I am actually not ...
155 views

How to convert a spaceless data into tab delimited

I have a data set in form of:(this is just an example) 1324501020 3241030205 4332020134 the data are stored in a text file (e.g. data.txt) but I need to convert ...
46 views

Difference between matrix rapresentation [duplicate]

I've noticed different behaviour in Mathematica between matrix representation: The matrix a={{1,2},{3,4}} is different from b=a // MatrixForm Why i obtain ...
222 views

Pattern match with Table for matrix dimension check

In Mathematica, often an expression involving matrices will encounter dimension mismatch errors, like we are multiplying a 3x2 matrix to a 3x4 matrix. Below we define a new symbol Dim, which can be ...
474 views

Optimizing functions taking matrix arguments

I'm looking for general information on how to optimize matrix valued functions, I have the following function I'm looking to maximize (or figure out if this is possible at all). ...
771 views

extracting the rows of a matrix satisfying a condition (e.g. all elements negative)

I have a matrix with thousands of rows and want the submatrix comprising the rows of the original matrix that have, e.g. a negative element in column 3. How to do that?
555 views

Expanding Matrix Expressions

I want Mathematica to recognize that A.(-B.C)+A.B.C = 0 Yet FullSimplify and the like leaves the expression as it is. How do I get around this?
781 views

Add a sub-matrix of zeros in big matrix [duplicate]

I have a matrix of size $24\times24$ composed by 8 $3\times3$ submatrices in a diagonal way. I want to add a matrices of zeros ($3\times3$) between the sub-matrices, so the final matrix would be of ...
2k views

Here is the Problem how to find out the Saddle Point inside Matrix. m = {{9, 3, 1, 8, 0}, {6, 5, 4, 6, 7}, {2, 4, 4, 3, 8}, {5, 6, 2, 2, 1}}
483 views

...
490 views

Mass Symbolic Manipulation with Subscripts? (from plaintext Input)

The simplest example of the change being sought is a greek letter, typed in as plaintext nu, and its may be replaced by the symbol, ν: expr = 3nu*kx*ky+ ...
243 views

How to simplify the complex result with trig-abs-sqrt obtained related with Cosine symbolic Matrix of EulerAngles

Here in X-convention Extrinsic ...
I want to make the following operation :  \begin{bmatrix} \dot q_1\\\dot q_2 \end{bmatrix} + \begin{bmatrix} \begin{bmatrix} q_1 & q_2 \end{bmatrix} \mathbf A_1 \begin{bmatrix} q_1\\ q_2 ...