COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### constraints in system of non-linear equations

• Follow

```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
```
 0

```"Tatyana Deryugina" <tatyanad@mit.edu> wrote in message <i252sp\$slt\$1@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
```
 0

```"Tatyana Deryugina" <tatyanad@mit.edu> wrote in message <i252sp\$slt\$1@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
```
 0

2 Replies
513 Views

Similiar Articles:

7/22/2012 4:37:09 AM