From: Tatyana Deryugina on
Hi,

I'm trying to solve a system of 3 non-linear equations (using fsolve), and I need to impose restrictions on the each of the unknowns. Is there a way to do this in Matlab?

In case you're wondering, the constraints are:
1>a>0
b>0
1>a+c>0
(a,b, and c are solutions to the equation)

Many thanks!
Tatyana
From: neil on
"Tatyana Deryugina" <tatyanad(a)mit.edu> wrote in message <i252sp$slt$1(a)fred.mathworks.com>...
> Hi,
>
> I'm trying to solve a system of 3 non-linear equations (using fsolve), and I need to impose restrictions on the each of the unknowns. Is there a way to do this in Matlab?
>
> In case you're wondering, the constraints are:
> 1>a>0
> b>0
> 1>a+c>0
> (a,b, and c are solutions to the equation)
>
> Many thanks!
> Tatyana

I think you are going to need the either optimisation toolbox or check out YALMIP
http://users.isy.liu.se/johanl/yalmip/
I think there are some free solvers
From: Matt J on
"Tatyana Deryugina" <tatyanad(a)mit.edu> wrote in message <i252sp$slt$1(a)fred.mathworks.com>...

> In case you're wondering, the constraints are:
> 1>a>0
> b>0
> 1>a+c>0
> (a,b, and c are solutions to the equation)
===============

A technique that people on this NG are found of is to enforce constraints by a change of variables. So, for instance, you could do

a=atan(A)/pi+0.5
b=exp(B);
c=(atan(C)-atan(A))/pi