|
|
solve non linear equations with constraint
Hi,
I want to solve a set of non linear equations f[X]= Y
where
Y is a given vector has n dimensions;
X is the vector to be solved, which also has n dimensions;
I would like to add one more constraint on X such that x1+x2+...+Xn=1
I am not sure if fsolve can handle constraint or is there another function that I can utilise? Please advise on this and many thanks in advance.
J
|
|
0
|
|
|
|
Reply
|
Jie
|
11/16/2010 10:09:05 PM |
|
"Jie " <jz286@cam.ac.uk> wrote in message <ibuve1$7r$1@fred.mathworks.com>...
> Hi,
>
> I want to solve a set of non linear equations f[X]= Y
> where
> Y is a given vector has n dimensions;
> X is the vector to be solved, which also has n dimensions;
> I would like to add one more constraint on X such that x1+x2+...+Xn=1
>
> I am not sure if fsolve can handle constraint or is there another function that I can utilise? Please advise on this and many thanks in advance.
=======
Why do you distinguish between this "constraint" and the other non-linear equations. Why not add this equation to your system
x1+x2+...+Xn=1
making it equation number n+1?
|
|
0
|
|
|
|
Reply
|
Matt
|
11/16/2010 10:32:04 PM
|
|
"Jie " <jz286@cam.ac.uk> wrote in message <ibuve1$7r$1@fred.mathworks.com>...
>
> I am not sure if fsolve can handle constraint or is there another function that I can utilise? Please advise on this and many thanks in advance.
You could also use the constraint equation to eliminate one of the variables, say x(n)
x(n)=1-(x(1)+x(2)+...+x(n-1))
You can then reformulate f[X]=Y in terms of the first n-1 variables x(i) only.
Failing that, there's always fmincon.
|
|
0
|
|
|
|
Reply
|
Matt
|
11/16/2010 11:20:04 PM
|
|
|
2 Replies
672 Views
(page loaded in 0.027 seconds)
Similiar Articles: solve non linear equations with constraint - comp.soft-sys.matlab ...Hi, I want to solve a set of non linear equations f[X]= Y where Y is a given vector has n dimensions; X is the vector to be solved, which also h... constraints in system of non-linear equations - comp.soft-sys ...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 ... fsolve help!!! - comp.soft-sys.matlabsolve non linear equations with constraint - comp.soft-sys.matlab ... fsolve help!!! - comp.soft-sys.matlab constraints in system of non-linear equations - comp.soft-sys ... how to handle large linear inequality constraints ( about 100 ...solve non linear equations with constraint - comp.soft-sys.matlab ... > > I am not sure if fsolve can handle constraint or is there another function ... programming ... Solving linear programming equations using linprog - comp.soft-sys ...solve non linear equations with constraint - comp.soft-sys.matlab ... Solving linear programming equations using linprog - comp.soft-sys ... constraints in system of non ... solving large number of nonlinear equations using matlab - comp ...solve non linear equations with constraint - comp.soft-sys.matlab ..... making it equation number n+1 ... Hi, I'm trying to solve a system of 3 non-linear equations ... solving two unknowns in two non linear equations - comp.soft-sys ...solve non linear equations with constraint - comp.soft-sys.matlab ... Hi, I want to solve a set of non linear equations f[X]= Y where Y is a ... Solving 2 non linear ... Three Stage Least Squares with Non-linear Restrictions - comp.soft ...solve non linear equations with constraint - comp.soft-sys.matlab ... Three Stage Least Squares with Non-linear Restrictions - comp.soft ... solve non linear equations ... solving the system of non linear equation - comp.soft-sys.matlab ...solve non linear equations with constraint - comp.soft-sys.matlab ... Hi, I'm trying to solve a system of 3 non-linear equations (using fsolve), and I need to impose ... solving nonlinear simultaneous equations - comp.soft-sys.matlab ...Hello. I'm trying to solve the following set of non-linear simultaneous equations for U and V: 1. U^3 + U*(V^2) = ((a*8*g*h)/f)^2 2. V^3 + V*... solve non linear equations with constraint - comp.soft-sys.matlab ...Hi, I want to solve a set of non linear equations f[X]= Y where Y is a given vector has n dimensions; X is the vector to be solved, which also h... solve non linear equations with constraint - Newsreader - MATLAB ...Hi, I want to solve a set of non linear equations f[X]= Y where Y is a given vector has n dimensions; X is the vector to be solved, which also has n dimensions; 7/21/2012 12:45:49 AM
|
|
|
|
|
|
|
|
|