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
0answers
36 views

smallest and largest eigenvalue of discretized operator $-d^2/dx^2$

In 1D, the second order derivative operator $-d^2/dx^2$ can be discretized as, using Matlab ...
1
vote
1answer
92 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
3answers
61 views

If $A,B$ are invertible so $AB$ is invertible

I thought about the following proofs but I am not sure about them there is $C,D$ so that $AC=CA=I$ and $BD=DB=I \rightarrow CABD=I \rightarrow$ due to associativity roles is no matrix $E$ so that ...
2
votes
1answer
53 views

Are “constrained linear least squares” and “quadratic programming” the same thing?

A Quadratic Programming problem is to minimize: $f(\mathbf{x}) = \tfrac{1}{2} \mathbf{x}^T Q\mathbf{x} + \mathbf{c}^T \mathbf{x}$ subject to $A\mathbf{x} \leq \mathbf b$; $C\mathbf{x} = \mathbf d$; ...
0
votes
0answers
51 views

Matrix inverses on matlab: are pinv and ./ related?

I faced with two actual implementations of the same problem, and need some help to find which one is correct. Let K be an non-square $m \times n$ matrix (a product of two eigenvalues vectors), B an ...
1
vote
1answer
67 views

Cyclotomic Cosets and Minimal Polynomial for 45

Currently I am working on matlab in order to find Cyclotomic Cosets for 45. As 45 in not in the format of 2^m-1, matlab give me an error. I am trying to write algorithm in matlab/octave for my ...
0
votes
1answer
39 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
105 views

Equation of hyperplane in Matlab

Given $n$ points in $n$-dimensions, using MatLab, how should we find the equation of the $(n-1)$-dimensional hyperplane passing through these $n$ points.
2
votes
1answer
45 views

Collinear points in 3dimension

Given three $3D$ points: $A,B$ and $C$, what is the procedure to check if they are collinear? In general, given $n$ points in $m$-dimension, how should one find out, if these $n$-points defines a ...
0
votes
0answers
78 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
0answers
100 views

Canonical Correlation Analysis (CCA) by SVD

We all know that CCA correlation vectors can be computed by eigen-decomposition (using function eig() in MATLAB) as shown here. For example: eig($C_{xx}^{-1}C_{xy}C_{yy}^{-1}C_{yx}$) (1) Recently I ...
0
votes
0answers
35 views

Computing an element of Moore-Penrose pseudoinverse of a large sparse matrix

I am computing resistance between two points in a network. To do this I compute the Laplace matrix and then take a Moore-Penrose pseudoinverse. However, I am really only interested in the resistance ...
0
votes
1answer
21 views

MATLAB: How to make a list of words in matrices?

Cross-posted from stackoverflow, where there seemed to be no interest: http://stackoverflow.com/questions/22329233/matlab-how-make-a-list-of-words-in-matrices Given two n by n invertible matrices A ...
0
votes
1answer
126 views

MATLAB determining elementary matrices for LU decomposition

I am confused by this question I am studying for MATLAB practice.
0
votes
1answer
298 views

PCA using SVD in Matlab, a few questions.

I have X = [25, 2000] i.e. 25 subjects and 2000 values (i.e. each subject has a spectrogram that is reduced to 2000 values). My goal is to reduce from 25 subjects to 1 or 2 "subjects" that best ...
0
votes
1answer
29 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$. ...
0
votes
1answer
34 views

MATLab help involving Linear Algebra.

I am trying to understand what is happening here.. A = floor(10*rand(3)); b = sum(A')'; z = ones(3,1); If I solve the system $Ax = b$, the solution is identical ...
0
votes
1answer
60 views

converting a signal back and forth with trigonometric functions

I'm trying to convert a signal back and forth using trigonometric functions. In the example below: 1) start off with a cos signal 2) convert the signal to a secant signal 3) would like to convert ...
0
votes
2answers
754 views

How to solve Ax=0.. with 4 unknowns and 4 linear equations

I am trying to solve 4 linear equations for a 3D triangulation problem to create a function in matlab code. I have 4 equations such as aX + bY + cZ + dW = 0 eX + fY + gZ + hW = 0 iX + jY + kZ + lW ...
0
votes
1answer
67 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$) ...
3
votes
2answers
358 views

Matlab code for computing index of matrix

I need help to make Matlab code for computing index of matrix. The index of matrix $A$ is the least non negative integer $k$ such that $\operatorname{rank}(A^{k+1}) = \operatorname{rank}(A^k)$. ...
-1
votes
1answer
114 views

Solve nonlinear equations: variables with degree six and degree eight.

Suppose I have two nonlinear equations with two variables $\ell$ and $m$; the variables $\ell$ and $m$ are of degree eight in the first equation and of degree six in the second equation. How it ...
0
votes
1answer
65 views

Understanding an affine transformation

I am trying to implement a modified version of sift tracking. I found a matlab implementation of sift to track objects in which, basically, they take the indices of the matches and compute the ...
1
vote
1answer
177 views

How to find null space of a matrix over $\mathbb{GF}(2)$?

How to find null space of a matrix over $\mathbb{GF}(2)$ ? Are there any algorithms available? I am not sure here is appropriate to ask this or not: Is there any routines for MATLAB or Maple?
0
votes
0answers
31 views

Single Layer Perceptron - output?

I'm trying to train single layer perceptron. I don't understand one thing. How to calculate output for vector input x? For example let say we have this data to use for training: ...
0
votes
1answer
125 views

Solving non-negative least squares by analogy with least squares (Matlab)

There is a least-squares problem Ax = b. It can be solved using backslash in Matlab (x = A \ b). Let's assume that I have the ...
0
votes
0answers
132 views

Reach logical conclusion using matlab a = b, b = c, then a = c

Looking for a way to solve multiple set of equations by substitution using Matlab. For example given two set of equations $a = b$, and $b = c$, i want to expect a possible set of solutions, like $a = ...
0
votes
3answers
103 views

matlab: how to solve this linear system

I have 2 vectors that are scalar multiples of each other but their components have an unknown 'z'. ie v1=[a, bz+c, e-zd ] v2=[e, fz+g, h+z] Only ...
0
votes
0answers
134 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 ...
1
vote
0answers
86 views

How to generalize matrix multiplication?

Consider expression $x^T A x$, where $x$ is a vector of size $5 \times 1$ and $A$ is a matrix of size $5 \times 5$. The result of the expression will be a constant. Now, how to generalize this ...
1
vote
3answers
224 views

PCA analysis on 1D set of observations

There are lots of discussions on the web about Principal Component Analysis (PCA) and how to use tools such as matlab octave for that. However none of them fit my problem. My problem is that I have ...
1
vote
1answer
1k views

Projection matrix onto null space

I have a matrix H and I want to find the projection matrix onto null space. How can I do this? Sorry if my question seems naive. Thank you, Tanja
2
votes
0answers
112 views

Intersection of orthonormal basis of two subspaces

I want to ask how can I form a subspace which is an intersection of the orthonormal basis of two another subspaces and find its dimension in Matlab? Thank you in advance, Maya
1
vote
2answers
345 views

How to find the 'centre' of vectors in 3-dimensional space.

How do I find the 'centre' of a set of vectors in $ℝ^3$? By centre I mean I want to find a vector such that maximum angle between it and any other vector in the set is kept to a minimum. Another way ...
0
votes
2answers
328 views

How to calculate the hessian of a matrix function

I am estimating a model minimizing the following objective function, $ M(\theta) = (Z'G(\theta))'W(Z'G(\theta))$ $Z$ is an $N \times L$ matrix of data, and $W$ is an $L\times L$ weight matrix, ...
2
votes
3answers
407 views

Why is MATLAB giving me these weird eigenvectors?

I am doing a problem which involves finding the eigenvalues and eigenvectors of the matrix $$ M=\begin{bmatrix} 0 & 1/2 & 1/2 \\ 1/2 & 0 & 1/2 \\ 1/2 & 1/2 & 0 \end{bmatrix}$$ ...
0
votes
1answer
251 views

Null space of this matrix is no solution?

When I set this row reduced matrix (which I row reduced using matlab) equal to zero for finding the null space, am I supposed to get no solution? Because x8, the last vector will be equal to zero.
0
votes
0answers
165 views

Why is there no Overshoot in this second order system?

A second-order system which has a damping factor of less than $1$ should have an overshoot right? The formula for this is: $$\exp{(-\pi*\zeta/\sqrt{1-\zeta^2})}$$ But I have noticed that if the ...
2
votes
1answer
217 views

Matlab plotting

Given the following linear system of differential equations $u'(t) = 6u(t)+9v(t)+15w(t)$ $v'(t)=-5u(t)-10v(t)-21w(t)$ $w'(t)=2u(t)+5v(t)+11w(t)$ with the initial conditions $u(0)=1, v(0)=2, ...
0
votes
1answer
61 views

Tensor ; How can i recognize the type of tensor???

I want to use Matlab for my project. matlab has tensor toolbox and in it there are two types of tensor : Dens tensor and sparse tensor. my project is about " fiber orientation". how can i know what ...
1
vote
1answer
969 views

How I can get coefficients matrix in MATLAB from the set of linear equations?

I am working in MATLAB and having problem in extraction of coefficients out of my set of symbolic linear equations. Equations are as such R = [0.8978*c - 0.8047*b - 0.020299*a, 0.8978*d - ...
3
votes
3answers
633 views

How to randomly construct a square full-ranked matrix with low determinant?

How to randomly construct a square (1000*1000) full-ranked matrix with low determinant? I have tried the following method, but it failed. In MATLAB, I just use: n=100; A=randi([0 1], n, n); while ...
0
votes
1answer
105 views

How to find if the vector is stable?

Let's say I have the following equation $Ax=b$ My question is - how can i find a vector $b$ around which the above equation is not stable? I have $$A= \begin{bmatrix} 1 & 0.999 \\ ...
1
vote
1answer
41 views

Count number of 1's in $\textbf{u}\textbf{v}^T$

I am seeking for an efficient algorithm to count the number of 1's in the outer product $\textbf{u}\textbf{v}^T$, where $\textbf{u}$ and $\textbf{v}$ are both binary column vectors. The dimension of ...
0
votes
1answer
478 views

How to find lower bound on condition number of a matrix?

The condition number is given as follows: $c(B)=\|B\|\|B^{-1}\|$ My questions are: 1. Considering that $B$ is non singular, i have to show a lower bound on $c(B)$ for $B$ 2. What is that lower bound ...
0
votes
2answers
1k views

How to do the following projection in Matlab?

I have 2 vectors $u$ and $v$ given in $\mathbb R^4$, e.g. $u = (-1,-2,3,4)$ and $v=(1,-2,-3,5)$ I also have $Ax=b$ which is an under-determined system; meaning, if $A$ is $m\times n$, then $m\le n$. ...
0
votes
1answer
181 views

How to do I this linear least- squares problem?

This is what i am given: $y=[3, 5, 5, 8, 10, 12, 15, 16, 18, 19]$ and $t=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]$ experimental data Solve x=A\b Thanks got it
3
votes
1answer
254 views

How does Matlab or computer algebra systems find derivatives of functions?

Is it correct that they use a matrix transformation?
2
votes
1answer
569 views

Matlab Matrix Multiplication Calculate Significant Figures

First off, long time reader, first time poster. Thanks in advanced for all the help this site has offered! So the question! I have two matrices in the form of the variables ...