# MATLAB: Fmincon for optimal solution

fminconMATLABoptimzation

Hi everyone,
I have a question about optimization as follows:
the object is to maximize sum_F=(F(1)^2+F(2)^2+F(3)^2)
However, it subjects to these constraints:
1. A*lambda=B-C*F;
2. torque=D-E*lambda;
3. the absolute value of each element in torque <=max_torque;
4. G1(torque)<=120;
5. G2(torque)<=120;
6. G3(torque)<=200;
7. G5(torque)<=200;
where
A is a 4*6 matrix,
lambda is a 6*1 vector,
B is a 4*1 vector,
C is a 4*3 matrix,
F is the 3*1 vector,
both torque and D are the 6*1 vector,
E is the 6*6 matrix,
and F is the unknown variable, whose three elements are to be maximized,
A,B,C,D and E are all known variables, lambda is the intermediate variables.
G(1) ~ G(5) are five scalars which are the functions of torque. Because of the complex relations in the constraint 1 and 2, G(1)~G(5) cannot be expressed by F directly, and they are expressed by torque.
anyone knows how to solve it in matlab ? Can it be solved by fmincon?
THX very much!