From: Andy on
Hi everyone,

I'm about to close a particular chapter of the work I've been doing using Matlab to solve an A*x=b system of equations. Before doing so I wanted to get some other peoples opinions regarding a way to solve for x before I just leave my results where they are.
I only have one constraint and that is that x must be positive. This obviously rules out x=A\b (which gives negative and positive values) and the great LSQR function which also gives me negative values. With help from forum users I attempted to use quadprog (using Euclidean norm) but to no avail. My staple function has been LSQLIN and I set my lower bound to zero. The best fit I get is between 7-15% NRMSE (where as LSQR would give ~1% if allowed). Whilst the result won't be exact for this overdetermined system, why can't I get a closer result?

My A matrix is 500 x 216 and b is 500 x 1. I have tried reading the available resources, including text books and have done my best to understand how to implement more complex constraints but they always seem to worsen the solution.

I feel I must be doing something incorrectly as most people here are trying what seem to be much more advanced problems and still having success. Can anyone point me towards additional resources or suggest a different method to approach this problem?
From: Steven Lord on

"Andy " <litchfield.a(a)gmail.com> wrote in message
news:hko507$cca$1(a)fred.mathworks.com...
> Hi everyone,
>
> I'm about to close a particular chapter of the work I've been doing using
> Matlab to solve an A*x=b system of equations. Before doing so I wanted to
> get some other peoples opinions regarding a way to solve for x before I
> just leave my results where they are.
> I only have one constraint and that is that x must be positive.

Positive or nonnegative? If the latter, use LSQNONNEG.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: Andy on
Hi Steven, your right, nonnegative is more correct.
I have tried LSQNONNEG (~9%) as well and it gives virtually the same result as LSQLIN. I usually get no messages that convergence has been achieved with either, though I may have in the past with lsqnonneg. Do you think it likely that I can't achieve a better solution?
From: Steven Lord on

"Andy " <litchfield.a(a)gmail.com> wrote in message
news:hko6s6$63u$1(a)fred.mathworks.com...
> Hi Steven, your right, nonnegative is more correct.
> I have tried LSQNONNEG (~9%) as well and it gives virtually the same
> result as LSQLIN. I usually get no messages that convergence has been
> achieved with either, though I may have in the past with lsqnonneg. Do you
> think it likely that I can't achieve a better solution?

One of the first questions I'd ask is: are you certain that there is a
solution with all components nonnegative?

A = [1 0; 1 1];
b = [2; 1];

This system of equations has a unique solution; x = [2; -1].

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: Andy on
Well it may not - the condition of x>=0 is due to the actual physical nature of the problem the x variables represent. Whilst an exact solution with nonnegative numbers may not exist, I would like to get as close as possible i.e. reduce min|Ax-b|
>
> One of the first questions I'd ask is: are you certain that there is a
> solution with all components nonnegative?
>
> A = [1 0; 1 1];
> b = [2; 1];
>
> This system of equations has a unique solution; x = [2; -1].
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
>
 |  Next  |  Last
Pages: 1 2
Prev: OFDMA and SC-FDMA simulink
Next: Histogram Bin Values