Questions on the manipulation of matrices in Mathematica.

learn more… | top users | synonyms (1)

0
votes
2answers
69 views

How to show output of a matrix in m(1,1)=a11 m(1,2)=a12 …in this way…i have 50 *50 size matrix

How to show output of a matrix in m(1,1)=a11 m(1,2)=a12 ...in this way......i have 50 *50 size matrix so i want to do it efficiently. output to be shown like m(1,1)=a11 (in fortranForm) m(1,2)=a12 ...
0
votes
2answers
53 views

Output of matrix in FortranForm

matr2 = Table[FortranForm[matr[[i, j]]], {i, 4}, {j, 6}] but i want output to be more like this matrix(1,1)=a11 output in ...
0
votes
0answers
112 views

Matrix multiplication

I want to multiply 1000by1000 matrices but MMA runs out of RAM. ...
1
vote
2answers
92 views

Restricting Numbers in a Matrix

I am generating a random N x N matrix, but with a certain restriction. What I'm trying to do is that when there's a "1" in a position, all neighboring positions must turn to "0" (so if [i,j] = 1, then ...
0
votes
1answer
61 views

How large can be the dimension of a complex matrix which Mathematica can handle to find its eigenalues?

I have been working with 12 cross 12 complex matrix in Mathematica , I need to work with bigger size matrix of the dimension of the order of hundreds , I was wondering if Mathematica can handle ...
0
votes
0answers
95 views

using elements from a matrix into a function

Hi this is what i have done so far i have a surface with the length "l" and width "w". and i have split this surface into m*n sub surfaces. as shown below. ...
0
votes
1answer
99 views

Integrating elements from matrix

oI'm kinda new at using Mathematica. What I'm trying to do is create a matrix with elements inside. ...
4
votes
0answers
67 views

Eigensystem on HPC

I am submitting Mathematica jobs to an HPC. I have a large matrix that is a function of (x,y) and I am diagonalizing it for around 500 points in the plane. My initial idea was to request a node with ...
5
votes
1answer
463 views

Over 30mins to generate the first eigenvector?

Is it normal for Mathematica to take over 30mins to try to compute the first eigenvector of a 100x100 matrix? The matrix is reasonably sparse - about 90% of the cells are 0s and each column sums to ...
1
vote
1answer
77 views

How to form a variable from matrix elements

I have matrix with n rows and 2 columns, say m = {{x11, y12}, {x21, y22}, ..., {xn1, yn2}. Now, I want to form three new variables for example: ...
0
votes
1answer
64 views

Submatrix with linearly independent columns

What I want is the submatrix where all the linearly dependent rows have been eliminated. I tried implementing this solution, but it doesn't work in the following example: ...
0
votes
0answers
45 views

How to display a list using numerical values? [duplicate]

Suppose I compute the eigenvectors of a matrix like this Eigenvectors [{{3, 2, 3, 1}, {2, 3, 1, 1}, {0, 0, 2, 1}, {2, 3, 2, 1}}] The result I get looks like: ...
2
votes
1answer
221 views

Quick way to tell if matrix is integer-only?

What's the most shortest one-liner code to tell whether a matrix is integer-only? I've come up with: Length@Cases[A // Flatten, _?(Not@*IntegerQ)] == 0 but ...
1
vote
2answers
40 views

Exporting mixed data of matrices and vectors / lists

thank you for reading my question. I have a problem trying to export mixed data from Mathematica. I have different matrices and vectors, which should be combined to a output file. Here a ...
2
votes
1answer
131 views

Neighbourhood - Calculations

SeedRandom[0]; n = 5; (m = N @ RandomInteger[{1, 3}, {n, n}]) // MatrixForm result1 = MeanFilter[m, 1] // MatrixForm ...
12
votes
5answers
3k views

Division by zero is slow

Suppose I have two arrays of data, which I want to divide: ...
2
votes
1answer
119 views

how to diagonalize this symbolic matrix?

m = {{0, 0, w}, {0, t, -w}, {w, -w, r}} use equation P^(−1)A P, how to obtain P with Mathematica? Thanks!
3
votes
1answer
92 views

An efficient way to compare two matrices

I have two matrices mat1 and mat2, both are results from different algorithms that are supposed to calculate the same result. The nmax is around 300, the q varies from 0.001 to 1. ...
5
votes
4answers
242 views

How to extract a part of matrix satisfying certain condition(s)

I have a following matrix ...
2
votes
0answers
27 views

Automatically discover the class of an arbitrary matrix

In Wolfram|Alpha it is possible to discover some specific classes to which a matrix belongs. For instance, typing this in Wolfram|Alpha ...
4
votes
3answers
106 views

A Product function for matrix products

I would like to use an equivalent of the product-function in mathematica, but where instead of multiplying numbers I multiply matrices?
0
votes
1answer
47 views
1
vote
0answers
58 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 ...
2
votes
2answers
52 views

Returning the 3-dimensional vector from a skew symmetric matrix

I'm trying to write a function that takes in a skew symmetric matrix and returns the corresponding vector. When I write the following code, it works when I leave it as variables, but it does not work ...
0
votes
1answer
47 views

Display problem multiplying matrix [duplicate]

I'm multiplying matrices and I don't get answer I want I just get matrix M times matrix N, there is no result. What to do and ...
1
vote
0answers
106 views

Replace part in a matrix that matches specific pattern

I have the following problem. Given a matrix L which looks as follows, Matrix L is a link, route matrix. Further, I got the following vector (d), which indicates the demand per vertex combination. ...
3
votes
0answers
48 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
65 views
0
votes
1answer
47 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
82 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
77 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
71 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 ...
10
votes
1answer
202 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
45 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
109 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
93 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
148 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 ...
9
votes
3answers
712 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
64 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
98 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
107 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
126 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
120 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
72 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
63 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
94 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
168 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
254 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
154 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 ...