Non-negative results when solving a set of equations

Jaroslav Hajek highegg at gmail.com
Thu Jun 5 00:16:54 CDT 2008


On Tue, Jun 3, 2008 at 5:59 PM, Terje Hansen <T.A.r.hansen at tue.nl> wrote:
>
> Dear Octave experts,
>
> I have a set of equations (Ax = b) that I can solve with  A\b.
> However, due to physical reasons, the result can not contain negative values
> (they should be zero in that case). I went through the manual and did a
> search, but found nothing that could help me.

A bad search, then :)

If you are not satisfied with simply setting the negative components
of the solution to
zero, look for function lsqnonneg.

> Maybe you know some function (or mathematical trick/solution) that would
> help me?
>
> Thanks!
> --

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


More information about the Help-octave mailing list