Questions on the manipulation of matrices in Mathematica.

learn more… | top users | synonyms (1)

3
votes
0answers
40 views

Calculation the eigensystem of a matrix containing very small numbers

I'm dealing with a matrix containing very small numbers like 10^(-370). Whenever I'm trying to calculate the eigensystem of that matrix, it takes too much time, though the matrix size is not big that ...
0
votes
0answers
61 views
0
votes
1answer
35 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 ...
5
votes
3answers
69 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 ...
1
vote
1answer
68 views

Matrix elements scope definition

Alright, I'm very new to Mathematica and I have yet to learn a lot so please bear with me (sorry if this is a duplicate!): I want to create an $n\times n$ matrix $C$ with elements $c_{i,j}$ with $i,j ...
2
votes
3answers
69 views

How to get an element of a list , which is computed out of substituted variables?

What is the best way to get the element of a list, which is computed out of substituded variables? For example one wants to get the first element of the first row of ...
0
votes
0answers
28 views

Tensor product of matrices [closed]

I want to find an expression 〖 ∑_ij▒〖〖(σ〗_i⊗σ_i)M〗(σ〗_i⊗σ_i) sigma i's are pauli matrices and M is 4x4 matrix.To find this expression is there any program in mathematica?
9
votes
1answer
168 views

Compose many Geometric Transformations for 3D Graphics

I'm struggling to understand what would be a good way to compose several geometrical transformations to create a single TransformationFunction to be applied to a ...
1
vote
0answers
38 views

Creating a matrix from a list of simultaneous equations

I have a list of n simultaneous equations of the form, w A[n] = (K[n,n+1]+K[n-1,n])A[n] - K[n,n+1]A[n+1] - K[n-1,n]A[n-1] ...
1
vote
1answer
73 views

Generate random nxn matrix with all negative eigenvalues

I need to generate an nxn matrix with random entries, but I also need all of the eigenvalues to be negative (real or complex doesn't matter). I have: ...
3
votes
1answer
73 views

Find the NullSpace of a matrix whose determinant is “almost” zero

If $A$ is a matrix such that $\det(A)=0$, it is easy to get a basis of the kernel of $A$ with NullSpace[A]. Now let's consider a matrix $B$, function of a ...
0
votes
0answers
59 views

Is there a command like meshgrid in Mathematica? [duplicate]

Just like the title, I need to do a meshgrid in Mathematica, is there any command like that?
5
votes
0answers
133 views

Is it possible to implement symbolic sub matrices?

The accepted answer in the following link: http://stackoverflow.com/questions/5708208/symbolic-matrices-in-mathematica-with-unknown-dimensions provides a functionality to create symbolic matrices ...
8
votes
3answers
680 views

How to show matrix multiplication step by step?

Given a matrix, A: A = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; How can I do the matrix multiplication A times A step by step?
-1
votes
2answers
62 views

Algorithm to generate a matrix [closed]

I need to generate a matrix from the following expression Sum[c^(i+j-2 k)(-1)^(-k+j)(i*j)/((i - k)!(j - k)!k!), {k, 0, Min[i, j]}] where i, j = 0,1,2,......N ...
1
vote
1answer
92 views

Expressing a matrix in terms of four basis matrices

I have five matrices and I want to represent one in the basis of other four. So how do I find the value of coefficients? For example, if the matrices are I1, ...
1
vote
1answer
92 views

Solving a System/Matrix of Equations in Matrix Form

Ok, I am trying to solve an equation involving matrices (well, tensors actually), which is of the form: $\mathbf{e}^{T} \cdot \mathbf{M} \cdot \mathbf{e}$ = $\mathbf{N}$, where $\mathbf{e}$ is an ...
3
votes
2answers
113 views

Convert matrix rows into variables

Can anyone show me how to set all matrix rows to variables. For example, I have matrix w={{1,2,3},{3,2,1},{0,0,0}} and I need to set each matrix row to be separate ...
1
vote
1answer
90 views

finding eigenvectors of a n*n symbolic matrix [closed]

is it possible to find eigenvectors and eigenvalues of this matrix in mathematica?i have no idea about solution!please help... ...
1
vote
1answer
52 views

How to simplify symbolic matrix multiplication using the associativity of scalar multiplication?

My input is (2A).(3B). Is there a way to get 6A.B? All I could get back from Mathematica was ...
0
votes
1answer
60 views

Solving at zeroes of a matrix - code only works for simple equation

I have a matrix of zeroes (True) and non-zeroes (False). The matrix is generated from a table of values of two other variables. I'm trying to observe how the solution for p3 changes with small ...
5
votes
3answers
83 views

SingularValueDecomposition outputs unsolved Root expressions [closed]

I have a simple 4x10 matrix of real integers (It's a Vandermonde matrix for x=1,2,...,10, if that's relevant) that I'm trying to do SVU decomposition on. When I use the SingularValueDecomposition ...
3
votes
6answers
163 views

Change last column of a matrix

Given a (rectangular) matrix of integers, i.e. RandomInteger[4, {10, 3}] I want to apply the following rules only to the last column ...
6
votes
2answers
243 views

How to transform a matrix to upper-triangular with operation- tag elegantly?

Description: Recently, I have a thought that writing a function to show the transformation process when a matrix is transformed to upper-triangular. My trail ...
6
votes
3answers
147 views

Remove Successive Duplicate From A Large List (200k by 4 matrix)

I am interested in removing successive duplicate rows from a very large list (~200k rows by 4 columns) using Mathematica.The built-in 'DeleteDuplicates' seems to remove all duplicates, I am interested ...
8
votes
2answers
299 views

How to add a vertical line to a matrix?

Today, I want to write a program to show the solving process of a the inverse of a matrix, and I use the Elementary transformation, so I need to add a vertical ...
0
votes
0answers
31 views

Numerical Error with Matrix operations

A is a 3x3 matrix, b is a 3x1 vector. I try to convert [A|b], a 3x4 matrix, to [I|0]. So the formula is right multiple ...
8
votes
3answers
288 views

Random Integer Sequences

I want to construct a random square matrix in the following manner: a) Three states [0 | 1 | 2] are repeated ...
1
vote
2answers
88 views

Verify positive definiteness using random numbers

I wish to verify whether T'T - IdentityMatrix[2] is always positive definite for a certain choice of elements of T'T. ...
2
votes
1answer
124 views

An intuitive way to form an augmented matrix

Given an $m\times n$ matrix $A$ and a $m\times 1$ vector $b$, what is the most "intuitive" way of forming the augmented matrix $[ A\ b]$? The most concise way that I know of is ...
3
votes
1answer
61 views

Computing kernels of a matrix in distinct cases

I have the following matrix: ...
1
vote
0answers
31 views

Symbolic computation under certain assumptions [duplicate]

Assume that I have a matrix $M$ and I'm doing some operations on it. Is there a way to specify that two variables satisfy an equation say $x=y^2$ and then let Mathematica compute under that ...
1
vote
1answer
95 views

Dirac Gamma matrix Algebra in different dimension

Do anyone know if we could do Dirac Gamma Matrix Algebra by FeynCalc with Gamma Matrices defined in different dimension than 4, e.g. DiracTrace of gamma matrices in 2+1 dimension? Thanks!
6
votes
3answers
194 views

Need help with plotting triple data points while xy data are not regular?

recently I plotted some figure in matlab whose quality is not so satisfactory, so I come to mathematica as my supervisor suggested. This is how it looks like in matlab:. In matlab I have three m by n ...
3
votes
3answers
59 views
14
votes
2answers
392 views

Better way to test that a matrix is upper-triangular?

Today, I got to thinking about how to test that a matrix was upper-triangular. So I had a try at it. Algorithm $\quad \quad a_{ij}=0 $ Or $i \leq j$ $\Rightarrow$ $True$ My solution is ...
9
votes
3answers
890 views

An inverted pyramid

I want to draw a pyramid approximately like this ...
2
votes
3answers
115 views

How to multiply specific columns in a matrix of data?

So I need to make a plot of some ~2000 data points I have from a spreadsheet. I'm able to import the data just fine, it stores it like so sundat ...
6
votes
3answers
217 views

Efficient method to generate Tridiagonal 50 by 50 Matrix? [duplicate]

I'm looking to generate a tridiagonal 50x50 matrix, ideally without using loops. Suggestions on most efficient code for this?
3
votes
1answer
96 views

Why does LinearSolve return the transpose of the answer matrix?

I am trying to solve an equation of the form $dv=F\cdot dV$ where $dv$ and $dV$ are matrices derived from the row vectors $dx$, $dy$, $dz$ and $dX$, $dY$, $dZ$ respectively. If it helps, $F$ is the ...
2
votes
3answers
114 views

Syntax of transpose etc [closed]

This is a simple question: {{0, 1}, {0, 2}, {0, 3}}*Transpose[{{0, 1}, {0, 2}, {0, 3}}] returns an error in Mathematica but works perfectly fine in Wolfram Alpha. Can someone help me? Thanks so ...
9
votes
4answers
275 views

Replacing matrix values

I want to find the n largest values in a matrix and replace all others with zero. The solution I found uses ReplaceAll and becomes very slow as the size of ...
6
votes
3answers
87 views

How to create a block diagonal matrix by repeating a submatrix $n$ times?

If there is a submatrix, let's call $P$: $P=\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}$ And I want to have $n$, let's say $n=2$, such submatrices placed on the diagonal. The result is ...
3
votes
0answers
67 views

Fast principal component analysis

I'd like to speed up a principal value value analysis. The data contains a large set of vectors with a large dimension. Both are in the range of 1000. I want to obtain the loadings matrix for further ...
0
votes
1answer
51 views

Combining lists in a matrix

So I have a list of data A={1.1,1.2,1.3,1.4,6.1} etc and B={2.5,2.6,2.7,2.8,2.9} I need to combine the lists into a matrix C ...
3
votes
1answer
136 views
4
votes
1answer
95 views

Efficient Dyson series implementation

I'm trying to implement a Dyson series \begin{array}{lcl} U(x,x_0) & = & 1 + \int_{x_0}^{x}{dy_1V(y_1)}+\int_{x_0}^x{dy_1\int_{x_0}^{y_1}{dy_2V(y_1)V(y_2)}}+\cdots \\ & &{} + ...
2
votes
0answers
49 views

CUDALink Error: A CUDALink kernel timed out?

I'm following the CUDALink tutorial [ http://reference.wolfram.com/language/CUDALink/tutorial/Introduction.html ] and everything is going fine until I get to the part that calls CUDADot on the ...
0
votes
6answers
189 views

How to build a game board [duplicate]

I have - rather lazily - constructed a chessboard like this: ...
3
votes
2answers
188 views

Order of eigenvectors [duplicate]

I have a matrix A = {{5, 4, 2}, {4, 5, 2}, {2, 2, 2}} The eigenvalues are 1, 1, 10 and I need to find the eigenvectors. ...