Questions on the manipulation of matrices in Mathematica.

learn more… | top users | synonyms (1)

1
vote
1answer
70 views

Matrix multiplication for higher dimensional matrices [duplicate]

I have a matrix like this (myb1): I would like to get the matrix multiplication of each of the submatrix to itself. For example the first 2x2 matrix $\begin{bmatrix}1 & 2\\1 & ...
0
votes
0answers
21 views

KroneckerProduct of the lowest eigenvector

tmatrix, is a random matrix constructed with this command: tmatrix = RandomReal[{-1, 1}, {4, 4}] Its lowest eigenvalues can created by ...
0
votes
0answers
43 views

Compilable function with the functionality of SingularValueList

I'm doing something that involves finding the singular values of a lot of matrices. Basically I need to find singular values of $n$ matrices of dimension $n\times n$, where $n$ is as large as ...
3
votes
1answer
167 views

Understanding polyharmonic splines

Rahul Narain and J.M. gives implementation of the thin plate polyharmonic splines in this post. Rahul Narain's method is clear. J.M.'s is convenient to reuse. But J.M. used too many ...
0
votes
0answers
38 views

being a function in a multiple steps and using syntax for being shortened

My desire is to access to a table with the bellow construction: Table[desired[t], {t, 0, 2, 0.1}] For achieve to desired[t] ...
1
vote
2answers
152 views

Having trouble translating Matlab `fsolve` into Mathematica

I searched the site and found that someone said FindRoot is equivalent to fsolve, however, without proper options, ...
3
votes
1answer
121 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 ...
1
vote
1answer
53 views

Multiplying three matrices does not give expected form [on hold]

I'm having lectures on analytic geometry. I've learned that there is an associated matrix multiplication for a quadratic form: $\quad \quad \left( \begin{array}{ccc} x & y & 1 \\ \end{array} ...
3
votes
1answer
69 views

Eigenvalues function not producing expected results?

I'm running into a strange issue when trying to compute eigenvalues of a 2x2 matrix for graphene. If I "manually diagonalise" by multiplying the two off-diagonal terms together and taking the square ...
2
votes
0answers
30 views

How to get simultaneous eigenvectors of commuting matrices? [duplicate]

So let's say there are two square matrices A and B that commute (AB-BA=0). This implies that there must exist some complete set of vectors that are eigenvectors of both A and B. Is there any way to ...
1
vote
1answer
34 views

Can I rely on the ordering of the adjacency matrix? [on hold]

Suppose I have created a Graph[{1,2..n}, {1->3, etc}], and I take the adjacency matrix of that graph. Can I rely on the fact that the i-th entry in the graph is the i-th node in the matrix? Or maybe ...
0
votes
2answers
31 views

How to get Complement function working in a For loop? [on hold]

I've been working on a piece of code that will delete small components from a nested uneven matrix (n pages, n rows, 3 columns), by deleting the pages with less than ~30 rows. However, I've notice ...
1
vote
0answers
43 views

Does a matrix need to be rationalized when calculating MatrixExp? [on hold]

I have a sparse matrix, L, and need to calculate its exponential, MatrixExp[L t], where t is ...
-4
votes
0answers
33 views

Creating eigenvalues of a matrix [closed]

How do I store eigenvalues of a matrix in a For loop into a two dimensional array and then plot that array?
3
votes
3answers
155 views

Matrix with known entries but unknown size [closed]

I am trying to perform some calculations with a matrix that has let's say size N but unknown, please How can I write this in mathematica?
0
votes
1answer
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 ...
0
votes
0answers
29 views

Finding the diagonal matrix of coefficients for a nonlinear set of equations [closed]

Suppose we have $ \widetilde{k_1} $ and $\widetilde{k_2} $ in term of $k_1$ and $k_2$. We want to find a matrix that relates this variables to each other. Here is the relations. $$ \widetilde{k_1} ...
3
votes
1answer
79 views

How to tell Mathematica that my variable is a scalar

In my calculations I have these combinations PauliMatrix[1].f PauliMatrix[2] where f is a scalar function. The result is as ...
4
votes
0answers
333 views

How to invert a matrix with 100 trillion elements?

I have a $10^{7}\times 10^{7}$ matrix with the following properties: it is sparse it is gamma-5 it is almost Hermitian. If $M$ is the matrix we are trying to invert, we know $M=A M^{\dagger} A$ ...
0
votes
1answer
74 views

Symbolic matrix calculation [closed]

I have question about a matrix calculation like $\mathbf{b}^{t}\,\Sigma\,\mathbf{b}$, where $\Sigma$ is a 7 by 7 matrix, and $\mathbf{b}$ is vector of 7 elements, and each element in the vector ...
0
votes
1answer
61 views

How does one initialize large arrays in Mathematica with a structured format? [closed]

I want to create a 10 by 10 matrix that increases by 1 every unit across like: 1 2 3 4 5 6 7 8 9 10 11..... Is there a function that does this without having ...
7
votes
1answer
105 views

Challenging matrix sorting request?

I have an application in mind, and I need to do the following analysis, but am having a high degree of difficulty conceptualizing it in terms of syntax. I understand what I want, but cannot seem to ...
3
votes
1answer
74 views

Extracting a time series from a sound object

After importing a sound file, how can I generate a time series (preferably as an $n\times 1$ matrix) which gives the intensity at equal time intervals?
0
votes
0answers
41 views

Mathematica error code 0x00000171

I'm getting above error code with a Trap 132 indication when attempting an ArrayPlot of a complex 130000 x 2048 matrix. Using Mathematica 9.0.1 with Mac OS 10.10.3 ...
1
vote
1answer
80 views

Unexpected inefficiency when calculating matrix product by Dot

There is an unexpected inefficiency when I calculate matrix product by Dot. The only relevant part of my code is presented as follows: ...
10
votes
1answer
211 views

How do I create a triangulated surface from points?

I have a set of points in a nx3 matrix and I would like to convert them into a surface, so that I may calculate its surface area. The function ListSurfacePlot3D creates the surface how I want it. ...
0
votes
0answers
47 views

Null space of a stochastic matrix [closed]

I want to calculate NullSpace of a matrix m - IdentityMatrix[n]. Normally I would do it with ...
3
votes
2answers
109 views

Matrix Plot: How to Apply color function to only a region of the plot

I want to make a matrix plot where a color function is applied to a region of a matrix. Those matrix elements which were not in the region specified should not have any color associated with them, and ...
4
votes
2answers
79 views

Pauli matrices — simplify expressions without printing out the raw matrix

Squaring a Pauli matrix results in the identity matrix. These bits of documentation (weakly, to a Mathematica-newbie like me) imply that some algebraic identities that link the Pauli matrices ...
2
votes
2answers
1k views

Is there a built-in function to find the adjoint of a matrix?

I've been looking for a function that helps me get the adjoint matrix o a given one, I found that you can get the cofactors of a matrix but only by using the "Combinatorica" package, which I couldn't ...
8
votes
1answer
282 views

Is it possible to implement symbolic sub matrices?

The accepted answer in the question Symbolic matrices in Mathematica with unknown dimensions provides a functionality to create symbolic matrices which behave pretty much as the name suggests. ...
9
votes
1answer
398 views

How get eigenvectors without phase jump?

I'm using Eigenvectors to get the eigenvectors for some matrixes, but the eigenvectors seems to have some phase jump. Here is an example: Say we have a 2 by 2 ...
0
votes
0answers
33 views

Why is there a different eigenvector for the same matrix? [duplicate]

I have a matrix that depends on two variables x and y. Matrix[x,y] When I make x=-.25*(1 - 1/3) + .25*(1/3) + .25 y=0 I ...
1
vote
1answer
64 views

How to specify positions in a matrix by an array?

If I have an array of sets of points such as pts = {{2,4},{1,3},{5,7}} Is there any super short command to use those pairs to output their respective elements in ...
0
votes
1answer
104 views

Finite Field matrix rank calculation

How does one define a matrix over $\mathrm{GF}(p^r)$ in Mathematica in order to compute rank? I am working with $\mathrm{GF}(2)$?
2
votes
5answers
186 views

Add values from a list, at positions from a list, to a matrix

I'm investigating matrix assembly and one of the things I'm trying to do is add specific values to a larger matrix based on a list which is essentially defining connectivity of nodes. For example: ...
0
votes
1answer
81 views

How do I store Eigenvalues of a 14*14 matrix in a For loop into an array and then plot that array? [closed]

I have a matrix 14*14 that is dependent on parameter a. How can I plot eigenvalues of the matrix according to varous values of a?
7
votes
5answers
1k views

Check if a matrix is Positive Semidefinite

I have a question concerning the check whether a given matrix is positive semidefinite or not. In mathematica the function PositiveDefiniteMatrixQ[m] tells me ...
0
votes
0answers
44 views

Normalized, symbolic Eigenvectors without abs(), sign() etc

I'm trying to compute the normalized eigenvectors of a matrix M = {{0, 0, 0, 0}, {0, 0, M5, 0}, {0, M5, 0, M4}, {0, 0, M4, 0}} If I try Normalize ...
0
votes
0answers
44 views

vector product defined on kronecker delta [duplicate]

I have some vectors such as : a={{0}, {0}, {0}}; b={{1}, {1}, {1}}; c={{1}, {1}, {0}}; I wanted to product a by ...
2
votes
1answer
56 views

formatting matrix

I have imported a matrix from data file which was generated in Matlab. The problem is the character (") in beginning and end of every row. So I can not perform any operation on it. How to get out ...
4
votes
1answer
172 views

Eigenvalues of matrix not giving imaginary parts

This might be a very simple problem, but I can't seem to figure out why I am getting this. I am trying to find the eigenvalues of the matrix: ...
0
votes
0answers
64 views

Operatorial matrix

Suppose I have a matrix M=$\begin{pmatrix} A(p) & B(p) \\ C(p) & D(p)\end{pmatrix}$. I want to apply some operatorial matrix E such that EM=$\begin{pmatrix} 0 & \partial_p & \\ ...
10
votes
2answers
3k views

Badly conditioned matrix (General::luc)

With some matrices, I am receiving the following message: ...
3
votes
1answer
59 views

Recognising degenerate maxima in a matrix

Say I have the following matrix $\left( \begin{array}{cccccc} 1. & 0 & 0 & 0 & 0 & 0 \\ 0 & 0.707107 & 0 & 0 & 0 & 0.707107 \\ 0 & 0.707107 & 0 ...
0
votes
1answer
53 views

Designing a loop that fetches 5 random vectors each with 5 components from a set of 10 until Linear dependence is found

I am currently trying to find a way to make a loop that will select 5 random columns without replacement of a 5x10 matrix until it finds a determinant equal to 0 out of the new matrix formed by the 5 ...