New answers tagged

2 votes

Least norm solution to a set of linear equations

If I'm not mistaken, this is what you're looking for: Inputs for a problem of the form mat.x == y: ...
user avatar
  • 18.3k
5 votes
Accepted

Least norm solution to a set of linear equations

It is a standard fact that x = PseudoInverse[M].b does what I think you want, namely: Return an x that minimizes ...
user avatar
4 votes

Finding eigenvectors of a symbolic matrix

Here is one, not particularly sophisticated, approach using Normalize. You could use evs = Map[Normalize,Eigenvectors[{{a,b},{b,-a}}]]; to get normalized ...
user avatar
7 votes
Accepted

Matrix Integro-differential equation

The problem can easily be solved after reformulation to a system of ODEs. Let us start with $$ \frac{d\rho}{dt}=-i[H_{0}(t),\rho(t)]-A^{2}\Big[H_{1},\int_{t1}^{t}e^{-B(t-s)}\Big(e^{-i\int_{s}^{t}H_{0}(...
user avatar
  • 16.1k
3 votes

How to find the index of a square matrix in Mathematica quickly?

In version 13.0.1, there is a undocumentation function LinearAlgebra`MatrixIndex. But I'm not sure when this is introduced ...
user avatar
  • 23.7k
2 votes

Solution to a linear equation with minimum rank

We can use Nonnegative Least Squares Algorithm (NNLS) discussed here to solve matrix equation X.M=A with constraints ...
user avatar
  • 34.1k
2 votes

Approximate strictly positive solution to a linear set of equations?

THIS IS AN EXTENDED COMMENT RATHER THAN AN ANSWER. It is inefficient to use Table to generate random numbers. ...
user avatar
  • 121k
11 votes

Nonnegative Least Squares Algorithm (NNLS)

We can compare 6 algorithms based on FindMinimum,NMinimize, ConvexOptimization, ...
user avatar
  • 34.1k
0 votes

How to solve this equation with matrix rank condition

The build-in function MatrixRank cannot work in symbolic matrix. So I make a symbolic version MatrixRankSym here, then: ...
user avatar
  • 23.7k
3 votes

Solution to a linear equation with minimum rank

Your transposed equation looks like Transpose[M].Transpose[X]==Transpose[A] LeastSquares finds the minimal solution ...
user avatar
4 votes

How to obtain independent variables from a set of linear constraints

...
user avatar
  • 121k
8 votes
Accepted

How to obtain independent variables from a set of linear constraints

First one can set up and solve the system. ...
user avatar
2 votes

How can I generate a tridiagonal block matrix?

The matrix you have is block tridiagonal and block Toeplitz. I'll give two methods: one that uses nothing but documented functionality, and one that uses undocumented functionality. First up is an ...
user avatar
4 votes

How can I generate a tridiagonal block matrix?

It must be many ways to do this,here we provide one way. ...
user avatar
  • 33.1k
11 votes

Is it possible to use the DGEEV and DSYEV LAPACK subroutines in Mathematica?

You can use LibraryLink to call LAPACK directly. It involves however quite a lot of boilerplate code. Here is an example: ...
user avatar
0 votes

Matrix basis using `Orthogonalize`

Redefine ip as, ip[x_,y_]:=Re[Tr[ConjugateTranspose[x] . y]]
user avatar
  • 268

Top 50 recent answers are included