|
|
constraints in system of non-linear equations
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
|
|
|
|
Reply
|
Tatyana
|
7/20/2010 9:02:18 PM |
|
"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
|
|
|
|
Reply
|
neil
|
7/20/2010 11:47:03 PM
|
|
"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
|
|
|
|
Reply
|
Matt
|
7/21/2010 9:08:04 AM
|
|
|
2 Replies
513 Views
(page loaded in 0.036 seconds)
|
|
|
|
|
|
|
|
|