New answers tagged

3

This is easy to formulate in CVX, under MATLAB. A CVXPY solution, under Python, is similar. CVX code: cvx_begin sdp variable X(n,n) hermitian semidefinite minimize(norm_nuc(X-A)) X <= B cvx_end or alternatively cvx_begin variable X(n,n) hermitian semidefinite minimize(norm_nuc(X-A)) B - X == semidefinite(n) cvx_end Edit 2: CVX is very fussy about ...


0

I solved the problem by computing the eigenvalue with smallest magnitude with ARPACK. Is this correct?


2

@Federico Poloni 's fine answer states the impossibility of getting an exact yes/no answer using IEEE arithmetic. However, using interval arithmetic with outward rounding, it is possible to get a "not singular/don't know" answer. In particular, it may be possible to definitively conclude that the smallest singular value is strictly greater than ...


2

I also suggest looking into the condition number estimators, which will (with some degree of [un]reliability) predict how effectively numerically singular the matrix is. In particular, "Spectral Condition-Number Estimation of Large Sparse Matrices" based on LSQR seems like an interesting choice. attracted my attention one day. I would also ...


11

If you can compute products with $A$ and $A^T$, as you specify in a comment, you can run the classical sparse SVD algorithms such as scipy.sparse.linalg.svds, Matlab's svds, or Julia's Arpack.svds, which are based on Lanczos bidiagonalization. They are designed to compute singular values, and are likely to be more robust than a minimization routine coded by ...


1

Here's my 2 cents. I would set up the following minimization problem $$ \pi(x) = \frac{1}{2} (Ax)^T(Ax) $$ If $A$ has eigenvalues which are zero, there will exist a nonzero $x$ such that $\pi(x)=0$. So, I would try computing the gradient of $\pi$ wrt $x$ and use a gradient descent algorithm to drive $\pi$ towards zero. If you get reasonably close to zero ($\...


3

LAPACK has an implementation of the svd of a 2x2 triangular matrix. It appears to be very robust. The routine is XLASV2. To apply to a regular 2x2 matrix, you can simply apply a single givens rotation from the left/right.


4

You already know that at least theoretically, unconstrained matrices have a null space and consequently eigenvalues that are equal to zero. But, in practice, this is a meaningless condition because it can not be checked in an efficient way for large problems. The question you specifically ask is how you can detect whether constraints have been applied, and ...


3

TL;DR How can I determine which constrain I need to apply to the system to make problem solved? Or how can I determine which rigid body constrain I should apply to the system? The constraints are given by the boundary conditions of your problem, so you should know them before you have a numerical method as the FEM. In that sense, that is more a physics ...


2

As you said, "If displacement not be constrained, equation above can not be solved, because the system can have rigid body motion" So you should try to apply constraints that will not allow the body to move i.e. translate or rotate. In 2D there are 2 translations (along x and y axis) and one rotation (along z axis) to be killed. In 3D there are 3 ...


Top 50 recent answers are included