solve constraint optimization problem
Afficher commentaires plus anciens
I want to solve constraint optimization problem :
min||M||^2 , where the norm is the frobinus norm and M is 2×2 matrix =[1 x;x 1+2x]
i wrote like that but i got error
x = optimvar('x');
prob = optimproblem;
M=[1 x;x 1+2*x]
prob.Objective = norm(M,'fro')^2;
prob.Constraints.cons1 = x^2-2*x <=1
prob.Constraints.cons2 = x >=- 1/2;
sol = solve(prob,x)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Get Started with Problem-Based Optimization and Equations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!