0
votes
0answers
14 views

create sparse matrix from diagonal array in matlab

I have the 7 diagonal that come from a 3D finite volume discretization in separate arrays. These 7 arrays have 3D shape and correspond to each elements of the stencil for all points: top, bottom, ...
2
votes
2answers
43 views

Matlab terminate code if warning occurs [closed]

I am running a code where by I want to maximise a parameter (basically the range of integration) by increasing it in steps until a warning occurs. It involves inverting a linear system Ax=b and I want ...
0
votes
1answer
62 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
1answer
47 views

Solve Ax = b, but I have a function that implements A

I have an overdetermined linear system $Ax = b$. I need to choose an $x$. $x$ has about 100 elements in it. If I had the matrix $A$, I would set x equal $A^\dagger b$, the pseudoinverse of $A$ ...
2
votes
1answer
62 views

Partial vs. full eigendecomposition when computing matrix logs with Matlab

I'm looking over a program that performs a matrix logarithm in each iteration, which necessitates looking at the eigendecomposition of the given matrix iterate $M^{(i)}$. However, rather than consider ...
2
votes
1answer
123 views

Numerical Analysis using MATLAB. Find the condition number $\mu$

Find the condition number $\mu = |A||A^{-1}|$ for the Hilbert Matrix $A$ using the uniform form. $A = \left( \begin{array}{cccc} 1 &\frac{1}{2} & \frac{1}{3} &\frac{1}{4} \\ \frac{1}{2} ...
1
vote
2answers
700 views

Moore-Penrose pseudo inverse algorithm implementation in Matlab

I am searching for a Matlab implementation of the Moore-Penrose algorithm (convertable to C++) computing pseudo-inverse matrix. I tried several algorithms, "Fast Computation of Moore-Penrose Inverse ...
2
votes
1answer
487 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 ...
4
votes
1answer
344 views

How do I numerically calculate a function from its noisy gradient using “global integration”?

I have the model $\ s(x,y)=x^2+y^2, 0 \leq x \leq 1, 0 \leq y \leq 1 $. Instead of observing the model directly I am observing the derivatives of the model + some noise (e): $\ p(x,y)=s_x+e, ...
0
votes
2answers
236 views

A question concerning Toeplitz matrices

I am studying Toeplitz matrices. I have to find out the eigenvalues of the following Toeplitz matrix: $$\begin{bmatrix} 2 & -8 & -24 \\ 3 & 2 & -8 \\ 1 & 3 & 2 ...
1
vote
1answer
283 views

Minimization of function expressed with vectors and matrices

I need to find vector $\bf{p}$ in the following system: $$\bf{0} \approx \bf{W} \left[ \bf{C}^2 \bf{p} - \bf{d} \right]$$ $$\bf{0} \approx \varepsilon \bf{p}$$ In the above, $\bf{0}$ is a vector, ...
2
votes
0answers
2k views

What is the algorithm for LU factorization in MATLAB?

What is the algorithm for LU factorization in MATLAB, i.e. [L,U] = lu(a)? After searching for many examples and trying to compare the result with MATLAB, they are ...