non negative least squares minimsation of a complex matrix

Hello all
I would like to minimise Ax-b
where A and b are a complex matrix and vector respectively.
I would like to constrain the answer to have x>=0 (i.e. positive or zero and real).
the function lsqnonneg(A,b) does what I want but only for real matrices and vectors.
I would really appreciate any suggestions.
Thanks Graham

2 Comments

OK so I've solved it now; the answer is simple:
x = lsqnonneg([real(A);imag(A)],[real(b);imag(b)]);
i.e. double the no. of rows of the matrix and vector by tacking the absolute imaginary values beneath the real values of the matrix and vector and solving this purely real problem with lsqnonneg. I got the solution from a Maths professor
Sorry, can b be a matrix as well?

Sign in to comment.

Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Asked:

on 12 Mar 2012

Commented:

on 17 Mar 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!