Solution of least-squares problems \vert(x*s-e)\vert with Ax=b

30 Views Asked by At

Considering the following problem

$\min ∥xs-e∥$ s.t $Ax=b$

,where we know that $A$ is a $m\times n$ matrix and $b$ is vector $m\times1$ .

Also vector $s$ is a $n\times1$ matrix with all its elements not negative

and $e$ is the vector with all its components equal to $1$.

$xs$ is the Hadamard product of $x$ and $s$ .

1

There are 1 best solutions below

2
On

This is an easy to formulate and solve convex linearly-constrained least squares (2-normn) problem using CVX, CVXPY or similar tool.

In CVX under MATLAB:

cvx_begin
variable x(n)
minimize(norm(x.*s - 1))
subject to
A*x == b
cvx_end