Questions on the manipulation of matrices in Mathematica.
2
votes
4answers
147 views
How to generalize and speed up this prorgam?
There is a vector whose length is $n*m$, we can part it into $n$ sections in order. I want to define a function to compare the $i$-th and $i+1$-th section and find the minimum. The program for $n=m=3$ ...
4
votes
1answer
78 views
Matrix Rational Canonical Form
Is there a way to calculate the Rational Canonical Form of an $n\times n$ integer matrix using Mathematica?
I have been perusing the documentation and web, but nothing so far.
7
votes
2answers
196 views
Is there any fast way to solve a quadratic matrix equation in Mathematica approximately?
Let the square nonsingular matrix $M$ is a given convergent matrix. What are the best scalar values for $\alpha$ and $\beta$ (in the real numbers domain), at which the following quadratic matrix ...
4
votes
2answers
107 views
Using two color functions in a MatrixPlot
I'm trying to use two color functions within one MatrixPlot in Mathematica. Is it possible to do this?
For example, using a very simple matrix:
...
1
vote
2answers
63 views
How do I create matrices with arbitrary list restrictions?
I want to randomly generate a square matrix of dimension n with entries in the list StartingEntries, and also satisfying that for any such matrix M, the matrix Inverse[IdentityMatrix[n] - M] has ...
4
votes
4answers
168 views
Elegant Matrix Combinations
Suppose you have a matrix (mxn), simplified for illustration
m= {{a, b, c}, {d, e, f}}
And a set of combinations (simplified for illustration purposes but can ...
-2
votes
1answer
99 views
Mathematica not assigning variable correctly
So I have been fiddling with this the last hour and I just can't get it to work.
I have 3 matrices of the same size which contain nothing but 0's in a list, I also have 3 matrices of the same size ...
1
vote
1answer
67 views
Convert 3 Matrices (R,G,B) into an image [duplicate]
My Image is in the format of the following:
MatrixForm/@ImageData[TestImage,"Byte",Interleaving->False]
(In that above example, the variable TestImage is an ...
2
votes
4answers
73 views
Generate Non-Singular Matrix of $n*n$ dimension
I want to create a function that will make an $n*n$ matrix which is non-singular that will always retrieve the same matrix (meaning that the matrix will not be random each time).
I tried using the ...
1
vote
1answer
81 views
What is the best way to produce a symmetric semi-definite matrix using as few variables as possible?
As we know, there are only $\frac{n(n+1)}{2}$ variables in a symmetric $n$-dimensional semi-definite matrix. Is it possible to produce a $n$-dimensional semi-definite matrix whose trace is $1$ using ...
1
vote
2answers
80 views
Error using Solve on Matrix Multiplication
I am trying to make a function the will find that value of $x$ in the following equation:
$x.a=b$
all values of $x, a, b$ are matrices. The dimensions of $x$ are unknown, but $a$ and $b$ have the ...
0
votes
0answers
31 views
Identify columns of a huge matrix just polynomially many rows chosen at random
I am interested in the following problem in combinatorics $\Cap$ Probability. Let $\lambda \in \mathbb{N}$ be a parameter. Consider a matrix of $2^\lambda$ rows and $2^\lambda$ columns. Each column ...
1
vote
2answers
114 views
How to generate a random matrix with specific parameters?
I want to use Mathematica to generate a random matrix with given dimensions, entries coming from a finite set, and with a determinant also coming from a finite set. (It's very important that the ...
18
votes
1answer
159 views
eigenvector bug?
I have a fairly simple $3\times3$ complex matrix,
$$
M=\left(
\begin{array}{ccc}
\frac{7}{2}-\frac{i}{2} & -1+i & \frac{1}{2}+\frac{5 i}{2} \\
-1+i & 5+i & -1+i \\
...
8
votes
6answers
172 views
Custom Matrix product
I have a list:
list1 = {{{a1, a2, a3}, {b1, b2, b3}}, {{c1, c2, c3}, {d1, d2, d3}}};
I want an operation that gives me:
Is there a built-in way of doing ...