0
votes
0answers
26 views

How to find integer solutions of a linear system?

I have a $M$ equation and $N$ variables like this : $ \begin{bmatrix} 3 & 0 & 1 & 0 & -1 & -3 & 2\\ 1 & 2 & 0 & 4 & 0 & 0 & -1\\ 1 & 1 & 0 ...
0
votes
1answer
47 views

Numerically Integrate Matrix Equation in Matlab / Octave

How do I integrate a matrix numerically in Octave / Matlab? I am trying to do the following integration numerically in Matlab $\int_a^b T(x)^{-1} B dx$ where $T(x)$ returns an 8x8 matrix. The ...
0
votes
0answers
33 views

Integration of ODE equation in Matlab / Octave

I have a system of 8 ODE's where the initial conditions are in matrix form. $\frac{dT}{dS} = H T$ where T at the initial state is the identity matrix. $T(a) = I$ H is a constant 8x8 matrix T is ...
1
vote
1answer
25 views

How to construct matrix from 4 sub matrices in Matlab?

I have an 8x8 matrix defined as $T = \begin{bmatrix}T_{UU} \quad T_{UF}\\T_{FU} \quad T_{FF}\end{bmatrix}$ I can define $T_{UU}$, $T_{UF}$, $T_{FU}$, and $T_{FF}$ as ...
0
votes
0answers
32 views

traingular matrix

I am not much in to the matrices. so I am sorry if I can not put forward the question properly. Assume $G_{n\times n}$ is a rank $n$ matrix (Indeed $G$ is the generator matrix of a lattice). I need ...
2
votes
0answers
19 views

using ode45 for descriptive forms

Using Matlab what would be the most efficient way to solve, $A_1x'(t) = A_2x(t)$, where both $A_1$ and $A_2$ are $n\times n$ matrices. Both are sparse matrices and hence I want to avoid inversion. ...
1
vote
1answer
93 views

find a matrix transform

Given a vector $v={(v_1,v_2,...,v_n)}^T$, I would like to find some matrix operations on $v$ to create an $n \times n$ matrix $X$ such that its entry $X_{i,j} $ satisfy (1), (2), (3), (4), ...
1
vote
1answer
31 views

Integration of a matrix by MATLAB

How do I integrate a matrix in MATLAB: A=[1,2;3,4]; B=[2*t;t^2]; i.e, how to compute: integral{expm(A*s)*B(s)}ds between ...
1
vote
1answer
31 views

Automatic defining global variables in MATLAB

How could I define a set of variables automatically in MATLAB. For example: kt1 to kt_n*(2*n+1) ...
0
votes
3answers
31 views

Generating a Triangular Matrix via a Vector MATLAB

How do I generate an arbitrary (size n) triangular matrix with a vector? For example: A=[1;2;3;4;5;6;7;8;9;10]; And the answer should be: B=[1,2,3,4; 0,5,6,7; 0,0,8,9; 0,0,0,10] or ...
2
votes
1answer
39 views

Strange matrix multiplication behavior in Matlab

I noticed strange behavior of some calculations in Matlab. Matlab code listing: ...
0
votes
0answers
36 views

Error in Matlab code, help please

I have a Unitary matrix MM1 and a theta function , I am trying to create another analytic function f by by summing up the products MM1(i, j)*thet(j) i.e say when j =1 f(1) = (MM1(1,d)*thet(0)) + ...
1
vote
0answers
39 views

what does autocorrelation matrix signifies in image processing?

I am trying to find out corners using auto correlation matrix in an image,what does it signifies?
2
votes
0answers
22 views

what is the significance of Eigen values of autocorrelation matrix?

I am trying to find auto correlation matrix of an image to get Harris corners.Paper I am referring suggest that if eigen values of auto correlation matrix are large the point will be corner point.so ...
0
votes
2answers
23 views

calculate principal components

suppose that we have following data ...
0
votes
0answers
58 views

Finding minimum of a distance function using matlab

I have a function for that I want to find the minimum. The function calculates the distance between two sets where a set is defined as matix of row vectors $ D = [ d_1, d_2, ..., d_n]$, $d_n$ is a $m ...
1
vote
0answers
41 views

Calculating MSE for two different size matrixes

I have two $2$-column matrixes, one of the has $467$ rows while the other one has $61468$ rows. Both them are trajectory paths of same robot, the big matrix is kind of raw data and the smaller one is ...
1
vote
0answers
42 views

random nonsingular matrices using matlab

Does anybody know how to generate a random nonsingular matrices using matlab? I use sprand (m, n , dens, 1)function to specify the condition number to be 1 right now.But it is too slow.Is there any ...
0
votes
1answer
44 views

How to do projections of data in MATLAB?

How to project a matrix e.g $$A = \begin{bmatrix}2& 5& 4\\ 3& 8& 9\\ 12& 11& 5\\ 4& -7 &8\end{bmatrix}$$ and get the vector_of_projected_points (VPP) onto the ...
1
vote
1answer
227 views

Median of Medians in 2D Array/Matrix

This is a bit of a mathematics problem, and a MATLAB problem. In MATLAB, if I call median(M), where M is an ...
0
votes
1answer
44 views

Backward error for Crout factorization

Ok, can someone please tell me what is the formula for the max error in LU decomposition of Crout factorization?
0
votes
2answers
31 views

How to write this b in matrix form in matlab?

Can anyone help me write this b in matrix form in matlab? I am letting n=10 for the dimension of A.
0
votes
1answer
17 views

Retrieving a Matrix from a Matrix multiplication

I have made a matrix multiplication in Matlab (K, P and S are all 2x2 matrices): K = P * transpose(H)*S Now Im given K, P, and H. I need to know S. Given that ...
0
votes
1answer
88 views

Matlab Index out of bounds

I'm trying to call a function using ode45 from another script file and I am passing in an matrix A. Matlab throws an error and ...
0
votes
0answers
81 views

Transform one curve into another

I have been working on something for a while now, and I can't really get my head around it. I consider two curves with data points and want to determine the most optimal transform from one to another. ...
0
votes
1answer
14 views

Building a square matrix having in the j-th column specific data

Why if we want to build the square matrix $A$ having in the j-th column the ordinates $y_i^j$ in the y5 vector, we have to elevate every column as it follow: ...
1
vote
0answers
127 views

Using SVD in PCA for image compression

I found some help material and guided by it tried to implement PCA using SVD in MAtlab for image compression. I did it in this way: ...
0
votes
1answer
32 views

Basis of a matrix with zero rows

I'm trying to check whether B is a basis for $\mathbb{R}^m$. If B is not a basis, I want to use the matrix eye(m) from matlab to create a basis for $\mathbb{R}^m$ that will contain all vectors from B ...
0
votes
1answer
148 views

Givens method for sparse matrix

I have to solve a linear equation system, Ax=b, where A is a (very) large sparse matrix (compressed sparse column form). From what I've read I think I'm supposed to use Givens method, but I don't ...
0
votes
1answer
28 views

Constructing a similarity matrix between points

I have two images with two sets of corresponding points. In order to align the images I'm trying to compute the similarity matrix that describes the relationship between the corresponding points. I ...
0
votes
1answer
51 views

Prove relative error with condition number of matrix inequality

I was working on some questions and solutions, and encountered the following question. I am able to prove the inequality using the given information and some algebraic manipulation but the "within ...
0
votes
1answer
129 views

Generating Different types of Matrices in Matlab

I am working on a project for a numerical methods class comparing two iterative methods for solving $Ax=b$, and I was wondering what type of functions Matlab has for generating arbitrarily large ...
1
vote
0answers
86 views

Solving a Large band system using Gauss-Seidel Iteration

Sorry for my english. I have to solve the following band system using Gauss-seidel iteration program in matlab. $$ \begin{array}{cccccc} 12x_1&-2x_2&+x_3&&&=&5\\ ...
0
votes
1answer
106 views

Matlab - Generate square convex function with positive definite Hessian Matrix

So, I have to generate a square convex function in Matlab and it's Hessian Matrix must be positive definite but I can't find any function that can help me do that. Is there anything I should search ...
0
votes
1answer
30 views

The entries of a random matrix

I am confused about something. Whenever I create an $n\times n$ random matrix using Matlab (using the command $A=\mathrm{rand}(n,n)$), I get a square matrix whose entries are all between $0$ and $1$. ...
-5
votes
1answer
48 views

Describe the Transpose of $A= \left[\matrix{0 & 0 & 1\\0 & 1 & 1\\ 1 &1 &1} \right]$

$$A= \left[\matrix{0& 0& 0& 0& 0& 0& 0& 0& 0& 1\\ 0& 0& 0& 0& 0& 0& 0& 0& 1& 1\\ 0& 0& 0& 0& 0& 0& ...
1
vote
2answers
290 views

Unexpected Lower Triangular Matrix given by Matlab

I was trying to find the lower triangular matrix L and upper triangular matrix U of an A matrix using the [L, U]= lu(A) command. For some reason, ...
2
votes
2answers
314 views

Finding D matrix in LDU in matlab

I have been searching the web for nearly 3 hours about a MatLab function that can take matrix A and give me back L, D, and U. ...
0
votes
1answer
68 views

Dense symmetric positive definite matrix

How could one define a dense symmetric positive definite matrix (dimension $1000 \times 1000$) with uniformly distributed eigenvalues (with the smallest eigenvalue $1$ and the condition number $100$) ...
0
votes
1answer
78 views

Fast Ax = b solver

I have got problem finding x with this equation $Ax = b$ where my matrix $A=\mu.\Phi^T\Phi+\lambda.I$ where $\Phi$ is $m$ x $n$ Gaussian random matrix. $x,b$ is vector $n$ x $1$ where I already ...
1
vote
1answer
113 views

calculating an incoherence property

With respect to Matrix Completion and Compressive Sampling (CS) I'm trying to understand how to calculate an incoherence property μ between two bases Φ and Ψ. Getting this incoherence is important ...
0
votes
0answers
46 views

2-norm of a matrix

I have come across the 2-norm of a matrix, http://www.matrixanalysis.com/Page281.pdf, this is something I found on the web. In particular, MATLAB calculates a norm of a matrix via the 2-norm, I was ...
1
vote
1answer
147 views

What are Riemann Matrix?

I got this information regarding Riemann matrix: RIEMANN is a N-by-N matrix associated with the Riemann hypothesis, which is true if and only if: ...
0
votes
2answers
85 views

Calculating the norm of a matrix in matlab

So I've been given the matrix A A = [1 2; 3 1] and the question is: If v is an error vector with ||v|| = 0.01, give an upper bound on ||A^30v||. ||A^30v|| = ||A^30|| * ||v||, correct? I used the ...
0
votes
0answers
27 views

Matlab rotate an SE

I need to generate 12 Segment Elements of 19x19 size, each of which rotate 15deg from each other, e.g.: ...
0
votes
0answers
42 views

Solving for a vector in Matlab

Suppose I have: $\sigma = w'*\Sigma *w$, where $\sigma$ and $\Sigma$ are given and $w$ is a column vector (n X 1), $\Sigma$ is a square matrix (n X n, and Positive Semi-Definite) and $\sigma$ is a ...
-1
votes
1answer
120 views

Using Matlab's bsxfun to substract matrices of different sizes

My professor gave me some matlab script in which I found the following line: differences = bsxfun(@minus, A, B); where A is of size [200,50] and B is of size ...
1
vote
0answers
138 views

Matlab (machine learning) - How to calculate binary scatter plot with straight line distinguishing these values?

Maybe title sounds a bit confusing, so I'll try to explain it. Let say we have a some matrix 4x4 = (0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 0) So some function should ...
0
votes
0answers
144 views

Matlab: Nullspace of a matrix mod p (i.e. over a finite field)

How can one compute the nullspace (or a basis of the nullspace) of a given matrix modulo a prime number $p$? I am specifically looking for the case $p=2$. I have been googling heavily to find a ...
0
votes
0answers
98 views

product of two well-conditioned matrices become ill-conditioned

All I want to do is to construct a matrix $\mathcal{A}$ (refer to bigA2 and bigA3 in the code) whose $i$-th row is $vec(U_1^TA_iU_1)^T$, and $U_1$ is a column-orthogonal matrix with columns being ...