maximizing the norm of a matrix using fmincon
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello! I am trying to find the maximum of |A(z)|_2. A(z) is a n x n real matrix. Each entry in this matrix consists of some nonlinear equation. For context, A is the jacobian of a nonlinear dynamical system and I need to find the upper bound on the norm of this jacobian. the decision vector z (n x 1) is upper and lower bounded. My code works but I get a value of the norm which is extremely large, perhaps I have a bug in the code. Here it is (with some simpliciations):
A = @(z) [....];
lb = [...];
ub = [...];
z0 = [...];
fun = @(z) -norm(A(z),2);
options = optimoptions('fmincon');
options.Algorithm = 'interior-point';
zStar = fmincon(fun,z0,[],[],[],[],lb,ub,[],options);
disp(norm(A(zStar),2));
Is there anything wrong with this code? I am not sure I have defined the objective function correctly, I have not found any examples of this.
Best Regards MC
0 commentaires
Réponses (1)
Alan Weiss
le 9 Oct 2017
What makes you think that there is anything wrong? You get a very large answer. Great! fmincon was trying to maximize. Is the answer feasible, meaning does the answer satisfy the bounds? If so, then I don't see a problem.
Alan Weiss
MATLAB mathematical toolbox documentation
0 commentaires
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!