# Tagged Questions

Questions on the manipulation of matrices in Mathematica.

127 views

### Recreating in Mathematica a matrix created in Python [closed]

I need to recreate in Mathematica this matrix that I created in Python: ...
70 views

### Plotting six chosen rows of a matrix

I have a matrix,W, whose dimension is n x n, each entry is a number. I need to plot only the values of six rows, namely those ...
91 views

### Calculating a function repetitively without using a For loop

In my programme I have defined all these functions: ...
111 views

### Filing matrix by bands [closed]

I need to fill a matrix, CSI, by taking elements from an array, inverse, which is the Inverse Fast Fourier Transform of an array ...
98 views

### sparse array with list [closed]

i'm trying to populate a sparse array with lists in certain positions, i tried the following code, ...
790 views

### Writing a circular matrix

I have two square matrices, $A$ and $B$, of the same size, say, of $m \times m$. What I want is to write a programme/function of three variables, $A$, $B$ and $n$, that outputs the $mn \times mn$ ...
66 views

### How can I manipulate this list?

I performed a loop with Table where I solve a system of 4 equations that depends on two parameters: eta and p. I create two lists for each parameter as follows: <...
78 views

### Defining a function of matrices [closed]

I am translating my code from Python to Mathematica. How can I define a function similar to the following: ...
201 views

### Define a matrix depending on variable in Mathematica [closed]

I am translating my code from Python to Mathematica. I am trying to define a matrix, whose values depend on a variable chosen by the user, called kappa. In Python the code looked like that: ...
134 views

### calculating subsets of a matrix (L=40X40)

I need to calculate all $k$-possible subsets$(k:1,L)$ of matrix with size $L$. I am using subset function as following, ...
106 views

### How do I generate all $n\times m$ matrices s.t. $a_{i,j} \in {a … b}$?

Is there a fast and clean way of generating all possible $n\times m$ matrices s.t. $a_{i,j} \in \{a ... b\}$ - much like Range does in $N$? Consider for example that for $n,m = 2$, $a=0$, $b=2$ I ...
277 views

### What is the “proper” way of multiplying a list of vectors by a matrix? Why Map does not work? [closed]

I am an absolute newbie with Mathematica, so please forgive me if this is stupid, but for the life of me I can't solve this. Suppose I have a list of vectors $b_{1...n}$ and a square matrix $A$ and I ...
1k views

### Verify Cayley-Hamilton Theorem

Consider the matrix: A = {{-1, -4, -2}, {0, 1, 1}, {-6, -12, 2}} Now, the characteristic polynomial is found: ...
148 views

### Unragging a matrix

Today I ran into matrices like this one: ...
166 views

### Maximum element and its position (row,column) of matrix

Can someone help me to get the maximum element of $m\times n$ matrix and corresponding row and column $(i,j)$?
474 views

### How to insert a Matrix into a larger matrix

I have a 4x4 matrix v1 v2 v3 v4 myM={{a1,a2,c1,c2}, v1 {a2,a3,c2,c3}, v2 {c1,c2,d1,d2}, v3 {c2,c3,d2,d3}} v4 And I want to ...
83 views

### Counting and updating a subset of matrix

I have an n by n matrix and would like to count the number of sub-matrices that is equal to a given matrix. Here is my code: DWBCL creates a matrix with elements a1, a2 and c2 in it and DWBCH with b1, ...
80 views

### Filling a matrix with a list of lists

I have a list of lists with different lengthes: {{a1,a2},{b1,b2},{c1,c2,c3},...} Now I want to create a matrix the following way: ...
237 views

### Creating a matrix under conditions

I would like to create a matrix whose elements satisfy the following conditions ( Mathematica 9 ) ...
191 views

454 views

### How to build a matrix from a set of vectors and other matrices using ArrayFlatten

I want to build a 6 by 3 matrix, from the following: one vector is 3 by 1, then a matrix, which is 3 by 2. These will go to the top 3 rows. Now the bottom 3 rows, I'll have 3 vectors each is 3 by 1. ...
201 views

...
154 views

### Solving matrix equation

How can I solve the forward equation S[t]=C+A*S[t+1]*(Inverse((I-B*S(t+1)))*A for t=1 to t=10 and ...
105 views

### Find algorithm or generator formula with automated procedure and pattern recognition

I am trying to find a generator formula for the discriminant of a polynomial and believe it would be an interesting problem for the Mathematica community to know how to automate evaluation of certain ...
393 views

### Diagonal minors of matrix

I need to calculate the minor of a matrix. I am going to use Mathematica example here, ...
361 views

### List manipulation: Dropping first or last row or column of a matrix

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 ...
73 views

### Elements inside arrays seem to be strings rather than signed numbers

When I have code like b = Array[Subscript[be, #] &, {3, 1}] b = b /. {Subscript[be, k_] :> Subscript[-be, k] /; k > 1} I am noticing that Mathematica ...
229 views

### Replace elements in matrix to make it symmetric using automated procedure

I am generating a matrix using (mat2 = Array[Subscript[a, ##] &, {4, 4}]) // MatrixForm but would like to force Mathematica to make it symmetric. Thereby I ...