Questions on the manipulation of matrices in Mathematica.

learn more… | top users | synonyms (1)

0
votes
0answers
18 views

Applied Linear Algebra | Linear Dependent Matrix [migrated]

My response: Am I correct in my approach? Thank you for your help.
0
votes
0answers
15 views

Applied Linear Algebra | Prove the intersection of two subspaces [migrated]

Question: Determine whether or not any column in the matrix is a linear combination of other columns. Provide a general method for answering the same question for any n x n matrix A. My response: ...
2
votes
1answer
69 views

Abstract iterator in Do

I'm trying to write a module. Its input is a matrix (tensor), the module should return new tensor with increased rank with 1. The new tensor is defined as $$ O \Rightarrow N_{\alpha \beta \ldots ...
1
vote
2answers
68 views

Problem in matrix multiplication

I created a random directed acyclic graph using Mathematica. I need to compute a specific function from its adjacency matrix. ...
2
votes
2answers
157 views

Are there any good mass row/column swapping functions for matrices?

I have the following matrix Keeping the 20 row and 20 column fixed (so the 21st rows and columns because I started at 0)...how do I push each row and column back one spot? I need to push the 0th row ...
1
vote
3answers
197 views

Writing code to update a large matrix?

How can I write a code to update a matrix based on certain rules? I plan on constructing a large matrix, and I cannot submit entries one by one. The rules for the matrix are as followed: $$ ...
3
votes
3answers
74 views

Express block matrix in terms of matrix basis

I'm trying to construct a function that returns the multiplication table of a matrix Lie algebra. Assuming a basis of matrices, my definitions: ...
1
vote
0answers
26 views

How can I get symbolic orthonormal eigenvectors for 3 by 3 hermitian matrix?

Using the following syntax, I can obtain the symbolic eigenvalues and eigenvectors of the following Hermitian matrix (a,b,c,d are all real parameters): ...
0
votes
0answers
31 views

How to change dimensions of a matrix?

I have two sets of data that I'm working with, both of which should be 1024 x 1024 matrices (they're from the same instrument). However, when I go to manipulate them, the dimensions of one are read as ...
-2
votes
1answer
71 views

Recreating in Mathematica a matrix created in Python [closed]

I need to recreate in Mathematica this matrix that I created in Python: ...
0
votes
0answers
44 views

Getting problems while calculating nxn matrix: output does not make sense [closed]

With this code I should be able to calculate the Wab, which is supposed to be a nxn matrix. The problem is that this matrix ...
0
votes
1answer
55 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 ...
0
votes
1answer
68 views

Calculating a function repetitively without using a For loop

In my programme I have defined all these functions: ...
1
vote
2answers
90 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 ...
0
votes
0answers
28 views

Translation matrix in sperical coordinates system [migrated]

I'm using WorldWind software to draw segments (polyline) on the globe to materialize an aircraft flightplan. Each point in a flightplan is named waypoint. Waypoints are expressed in geographical ...
2
votes
1answer
54 views

sparse array with list [closed]

i'm trying to populate a sparse array with lists in certain positions, i tried the following code, ...
4
votes
4answers
596 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$ ...
1
vote
2answers
48 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: ...
1
vote
1answer
68 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: ...
0
votes
3answers
76 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: ...
1
vote
4answers
97 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, ...
2
votes
1answer
95 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 ...
0
votes
1answer
48 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 ...
2
votes
3answers
129 views

Unragging a matrix

Today I ran into matrices like this one: ...
0
votes
0answers
30 views

How to add a positive definiteness of a unsymmetric matrix as a constraint to a Findminimum problem

The problem is I have a function which has 33 variables, and which to minimize it in a given set of contraints. I have also a matrix consisting of these 33 variables. The condition is that this matrix ...
0
votes
0answers
9 views

Add positive definite matrix constraint to an optimization problem [duplicate]

The problem is I have a function which has 33 variables, and which to minimize it in a given set of contraints. I have also a matrix consisting of these 33 variables. The condition is that this matrix ...
0
votes
1answer
42 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)$?
2
votes
3answers
123 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 ...
1
vote
1answer
58 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, ...
1
vote
2answers
52 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: ...
3
votes
3answers
140 views

Creating a matrix under conditions

I would like to create a matrix whose elements satisfy the following conditions ( Mathematica 9 ) ...
2
votes
1answer
103 views

Proving positive definiteness or semi-definiteness of a matrix

I have the following 4x4 real symmetric matrix: $K=\begin{bmatrix}3-3w & -\frac{4}{3}+a+2w & \frac{5}{12}+b-\frac{w}{2} & 0\\ -\frac{4}{3}+a+2w & -1-6a-3x & ...
0
votes
2answers
38 views

in the part assignment is not a symbol, create different matrices with a loop

Im trying to assemble new matrices from some previous matrices I have created, but I can´t. What Im trying to do is the following: 1) I have different matrices: ...
2
votes
1answer
149 views

Is there a bug in MatrixExp in Mathematica v10?

I'm trying to compute MatrixExp[-I t {{0, 1/2, 0, 0, 1/2}, {1/2, 0, 1/2, 0, 0}, {0, 1/2, 0, 1/2, 0}, {0, 0, 1/2, 0, 1/2}, {1/2, 0, 0, 1/2, 0}}] With ver 9 the ...
0
votes
1answer
31 views

Getting nicer values for eigensystems [closed]

I want to find the eigensystem of the matrix {{0.9, 0.5}, {0.1, 0.5}}. I tried Eigensystem[{{0.9, 0.5}, {0.1, 0.5}}] The ...
0
votes
2answers
70 views

Block anti-diagonalize a square matrix?

In Mathematica there is a very convenient function called JordanDecomposition[]. It takes a square matrix A as an argument and ...
0
votes
1answer
50 views

How to get rid of # in answer (eigensystem)? [duplicate]

I was trying to find the eigensystem of the following matrix (act as if the second character is in subscript): \begin{pmatrix} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ ...
0
votes
0answers
28 views

How to tweak a symbolic RowReduce?

B = {{-1, 1, 0, a}, {-1, 1, 0, a}, {-1, 1, 0, b}}; MatrixForm[B] RowReduce[B] // MatrixForm Mathematica is indeed giving ...
0
votes
1answer
53 views

Finite Field matrix rank calculation

How does one define a matrix over $GF(p^r)$ in mathematica in order to compute rank? I am working with $GF(2)$?
1
vote
1answer
63 views

Optimizing matrix inequalities over trace

I need to solve the following problem. Given $n \times n$ Hermitian matrices $A\geq 0$ and $B_1, ~ B_2$ (need not be positive semidefinite), with $Tr(AB_1)<0~,Tr(AB_2)<0$ construct a ...
4
votes
3answers
307 views

Complex conjugate

How do I complex conjugate a vector? ...
0
votes
1answer
88 views

What if do NOT want Mathematica to normalize eigenvectors with Eigenvectors[N[matrix]]?

ORIGINAL QUESTION Question speaks for itself. Mathematica normalizes the eigenvectors automatically when you type Eigenvectors[N[matrix]]. What if I do NOT want ...
2
votes
1answer
55 views

Inverting matrix with assumptions

I want to invert a matrix that contains some variables, so I thought I should give some assumptions to Mathematica to speed up the process. How do I assume that $s0,...,s8$ are positive constants ...
0
votes
0answers
32 views

A problem about NIntegrate the smaller eigenvalue for a matrix

Define a matrix and a function as ...
1
vote
1answer
99 views

Why can't Mathematica compute the null space of these matrices?

I'm writing a library of functions to work with musical pitch-class vectors. One of my functions gives me a skew-symmetric matrix modulo 12 that corresponds to the differences between components of ...
0
votes
2answers
81 views

Calculating eigenvalues of a large matrix takes a long time

I have a tridiagonal matrix (1000×1000) with each element equal to "one" except {n,n}=2`. It takes 8 hours to give me the eigenvalues?!!. Here, the code I used: ...
1
vote
2answers
156 views

Manipulating elements of a matrix, to loop or not ?

I have a grid of values generated from a MATLAB evaluation. Most of these elements are 0, some 0.5 and the remainder 1. I'd like to write a mathematica script which reads in the CSV and then, in every ...
0
votes
2answers
73 views

Matrix operation (simplify)

I had a $6\times 6$ matrix ...