Questions on the manipulation of matrices in Mathematica.

learn more… | top users | synonyms (1)

0
votes
1answer
97 views

How to obtain the orthogonal matrix that diagonalize a symmetric matrix [closed]

I have a real symmetric matrix H which is in symbolic form, I need a matrix P that can diagonalize H; also P is orthogonal and its columns are the eigenvectors of H. How can I doing this in ...
13
votes
1answer
314 views

Block Matrix Algebra with Mathematica

I have come up with some BlockMatrix Algebra for Mathematica to make notations easier. I have the following: ...
1
vote
1answer
81 views

Extracting Imported Information

What I want to do is to compare the relationship between the consumption of say beer and wine using scatter plots where each point designates the particular country (preferably named). I have tried to ...
0
votes
2answers
76 views

Replace matrix with conditions

I want to replace the values of 1. in slot under the condition that the year and month in basevalue and ...
0
votes
0answers
42 views

How do you explicitly define Box Operator (D'Alembert operator)? [duplicate]

I wanted to see how one can define a box operator in mathematica? $$ \Box\phi=(-\frac{\partial^{2}}{\partial t^{2}}+\frac{\partial^{2}}{\partial x^{2}}+\frac{\partial^{2}}{\partial ...
1
vote
0answers
64 views

Define inverse for the custom operator

I want to define simple matrix algebra (inspired by the following posts: Block Matrix Algebra with Mathematica ; How to define custom operators ). I assume the funtion ...
1
vote
1answer
167 views

How can you convert a matrix back into a list of lists?

It is very simple in Mathematica to convert a list of lists into a matrix: all you need to do is apply the //MatrixForm function to it and voila. Is it possible ...
0
votes
3answers
116 views

Implementing nested subtotals

Inserting a nested subtotal in a spreadsheet is a facility that Excel performs very well. But if a subset of this facility can be implemented in MMA for a table which needs it the hassle of its ...
1
vote
1answer
205 views

Contracting with Levi-Civita (totally antisymmetric) tensor

I have an array $v_{ijk}$ which is effectively a rank-$3$ tensor with dimensions $3\times3\times3$, and I need to contract it with $e^{ijk}$, i.e. evaluate $v_{ijk} e^{ijk}$ (see Einstein ...
0
votes
1answer
120 views

Applying a general formula

We are a group of students who are struggling with transforming this formula to run in mathematica. In fact there are many formulas that we are struggling with, but if we are able to see how this is ...
1
vote
1answer
143 views

How Manipulating a matrix and a graphic in only one Manipulate? [closed]

I have to manipulate a matrix and graphics in one big Manipulate-Block. This way: Manipulate[Matrixform[mat],Graphics3D[]] How can I achieve that? Ok, here my ...
35
votes
3answers
959 views

Tiling a square

I wondered if there was a way to automate the process of finding a way to tile a tile into a square. The idea is to represent the tile with a matrix of $0$s for blank space and $1$s for filled spaces ...
0
votes
2answers
87 views

How can I adjust matrices into the same ItemSize and aligned well in Notebook?

I typed three matrices, but they are not aligned well, and the Items in one matrix are also not aligned well and with differenct ...
2
votes
3answers
104 views

Join matrix based on conditions

Given the following matrix: ...
1
vote
3answers
111 views

Conditional Check on Matrix

Suppose I have the following matrix (i,j): ...
0
votes
0answers
64 views

Back Linear Substitution

I have an equation set Ax=b and A(n*m),n<m . To lower down the dimension, I express some vars by other vars, which gives ...
0
votes
0answers
82 views

How to make list density plot in polar coordinates?

I have a matrix like this {{r1,a1,f1},{r2,a2,f2}...{rn,an,fn}} where r,a and f are the radius, angle and the function value at this given r and a. I want to make a density plot, but it seems that I ...
0
votes
0answers
47 views

eigenvalues and eigenvectors without Root answers

I'd like to find eigen values and vectors of parametric 21*21 Matrix and i cant solve the root problem.please help me to find the answers without Root. My Matrix is: ...
37
votes
6answers
2k views

Does Mathematica have advanced indexing?

I have two $M \times K$ arrays $L, T$ where I would like to set all the elements in $L$ to zero whenever the corresponding element of $T$ is greater than 15. The ...
0
votes
0answers
23 views

Jacobian matrix formation from polynomial expressions [duplicate]

I want to find the jacobian matrix for 3 polynomial expression with 3 variables.. the polynomial expressions have the degree of 8.how to form it.?
-1
votes
1answer
78 views

Solve set of non linear differential equations [closed]

I have set of differential equations. For example, I took two equations and tried to solve them as below. I am not getting any results. Please help me to figure it out the mistake. And I wonder if I ...
0
votes
1answer
95 views

Why Eigenvalues thinks matrices are non-numerical

I use Mathematica version 9.0.1. ...
5
votes
3answers
261 views

Question about Map and Total

Suppose I have a list and I want to generate a new list, such that $$ NewList[index] = \sum_{index \neq j}^{NumOfElts} \frac {1}{ \lvert OldList[index]-OldList[j] \rvert ^2 } $$ Can I do it using ...
0
votes
1answer
124 views

Extracting coefficients from multiple equations and generating coefficient matrix

after 6 hours reading about string patterns, string manipulations and trying ..and trying..I officially give up (for now) and ask for some help. I have some unorderly equations you will find here ...
0
votes
1answer
58 views

Produce a 1-dimensional list of all unique matrix elements

We have some symbolic matrix m, e.g. m={{1, x, 4 x + y},{0, x y + 4x, 4x},{7 x, x, 4x + x y}} and we want to produce as output a list of all the unique elements ...
0
votes
2answers
110 views

How to display output as symbols?

I have this piece of code which populates a matrix following different rules depending on row and column number: ...
0
votes
2answers
90 views

Define a function on a parameter argument set to zero

Say I have an expression (matrix) that depends on several variables. f= {{a, b+c},{2a-b^2,c^5+a b}} I want to define new matrices with the single parameter ...
0
votes
0answers
46 views

Differential curve geometry Frenet Formula [duplicate]

I am using Mathematica for differential geometry studies using Frenet Formulae. The problem is that I need to graph the solution curve r[t]. Suppose the curvature of a curve is k(s) = |s|and the ...
0
votes
1answer
41 views

Function output of two lists are only diagonal elements

I'm having a little crysis over here. What I basically want to do is some sort of 3D-Plot, but I'm only interested in the resulting values. I have two vectors x and p: ...
5
votes
6answers
836 views

How to select all elements above the main diagonal of matrix?

How to select all elements above the main diagonal of matrix? I need to create a list of them.
0
votes
1answer
109 views

Symbolic matrix simplification and solving

I am trying to expand or solve an equation that contains matrices for a certain matrix, but it is not working: ...
0
votes
0answers
47 views

How do I interpret the Roots syntax when I am finding the eigenvalues of a matrix [duplicate]

Here is an example of my problem: I am somewhat confused by the syntax of this. I am guessing that the #1 is specifying the start of another root? Why then does one of the roots = u + with nothing ...
0
votes
1answer
83 views

How to faster map density matrix element to make differential equations

I have a time dependent matrix $M(t)$ of $L^n \times L^n$ size and want to write differential equations like D[M[i,j][t],t] = H[i,j][t] Here is my code: ...
-2
votes
1answer
67 views

I need to calculate sin[x] series summation for sin[A] where A is a 3X3 matrix

I am evaluating $\sin(A)$ where $A$ is a $3\times 3$ matrix. I have calculated it but now I want to check this with a Taylor series expansion of Sin[x]. What I am ...
4
votes
0answers
92 views

Discriminant of Characteristic Polynomial

I'm doing a calculation which finds the characteristic polynomial of a matrix with rather complex entries and then determines the discriminant of that polynomial. For smaller matrices up to around 7x7 ...
3
votes
2answers
228 views

Has Mathematica a function to compute the Smith Normal Form?

The Smith normal form is a matrix that can be calculated for any matrix (not necessarily square) with integer entries. See Wikipedia for a more elaborate description. Has Mathematica a function to ...
1
vote
1answer
84 views

How to place a matrix under controls (sliders) in a Manipulate?

I want to know how I can place a matrix under my sliders. Here is my code: ...
2
votes
1answer
113 views

Is there any faster way than Eigensystem to diagonalize a Hermitian matrix?

Is there any faster way than using "Eigensystem" to diagonalize(get all the eigenvectors and eigenvalues) of a Hermitian(self-adjoint) matrix? That would be amazing :). Thanks.
6
votes
4answers
193 views

Counting adjacent elements in a Matrix?

To start, I have a situation where I have some matrix, for example $$ A=\left[ \begin{matrix} 4&2&2&3&3\\ 2&3&1&2&3\\ 3&0&4&0&4\\ ...
1
vote
2answers
170 views

Fast randomization of a graph, while keeping the graph connected

I'm looking for a very efficient method for randomizing graph of a given size (N nodes, L links), but keeping them connected. Assume you have the adjacency matrix A of a given connected graph. You ...
0
votes
1answer
51 views

Solving symbolic matrix equation

I have this equation, $$f(x)=Ax-diag(x)(Ax+b)$$, where $x\in \mathbb{R}^n$, $A\in \mathbb{R}^{n\times n}$ and $b\in \mathbb{R}^n$, for which I need to find the zeros. $x=0$ is an obvious solution, ...
5
votes
4answers
347 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
1answer
187 views

How to speed up the computation of a specific array

I am doing some calculations on superconductivity and I REALLY need to speed up the way I calculate one of my arrays. I will put the input to the matrix (of course a tiny toy model of what I am ...
0
votes
0answers
87 views

How to extract connected bipartite graph from incidence matrix

I'm trying to extract a connected bipartite graph Bconn from the a given incidence matrix B- I have a matrix representing a bipartite graph - the incidence matrix B (weighted or not is unimportant). ...
8
votes
3answers
225 views

How can I complete a correlation matrix with missing values?

I would like to complete a correlation matrix with missing entries, such that the resulting matrix is positive semi-definite. Say I want to find some x and some y in the next matrix that satisfy ...
2
votes
3answers
323 views

Matrix Multiplication in context of row and column vectors

I've been looking at some matrices in Mathematica and I've noticed something very weird: They're extremely temperamental when it comes to dot products! For example, if I have the following, ...
1
vote
2answers
94 views

How to create automatically some matrices for symbolic manipulation?

I want to create in an automatic way some matrices to do symbolic calculations with them. They look like these: $$ \left( \begin{array}{cccc} a & 0 & b & 0 \\ 0 & 1 & 0 & 0 ...
2
votes
1answer
135 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 ...
5
votes
1answer
117 views

Is it possible to lower the bitwidth of (floating point) numbers?

The answer to this question will most probably be a definite no. Nevertheless, I would like to know whether it is possible to represent reals in the memory on less than the standard 32 or 64 bits ...