how to write a nonliear constraint with a convriance matrix in FMINCON
Show older comments
Dear All,
I've got to calculate a optimization problem with FMINCON. And this is my question. I have to use a covariance matrix as a part of my nonlinear constraint such as
(x1,x2,....xn)*cov*(x1,x2,...xn)'< V.
xi is the n unknoz varibles to optimized and cov is the convariance matrix, V is just a known real number. Since my n is quite large, like 30..so i dont know how to write this nonlinear constraint in Matlab as a c for
FMINCON(f,A,b,Aeq,beq,c,ceq)
Because all the doucments i found told me to right a equation manually, thats means i have to write something like
C=[x(1)^2*cov(1,1)+x(2)^2*cov(2,2)+...+2*x(1)*x(2)*cov(1,2)+2*x(1)*x(3)*cov(1,3)....]
this is nearly impossible..... so is there any ways to write this constraint with the covariance matix?
Thank you for any help.
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!