11 votes

Nonnegative Least Squares Algorithm (NNLS)

We can compare 6 algorithms based on FindMinimum,NMinimize, ConvexOptimization, ...
user avatar
  • 34.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
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
5 votes

How to get a rational solution of the linear system efficiently?

Get the same result about four times faster with NMinimize and rationalization. (Using the format for variables, @BobHanlon proposed.) ...
user avatar
  • 15.7k
4 votes

How to obtain independent variables from a set of linear constraints

...
user avatar
  • 120k
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
  • 32.7k
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
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
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

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
1 vote

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
  • 120k

Only top scored, non community-wiki answers of a minimum length are eligible