Unconstrained Optimization using fminunc and plotting convergence history
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have solved an unconstrained optimization problem using fminunc. I now want to plot the convergence history, ie , plotting the function value at each iteration of a graph. How do I extract the iteration and function value arrays so that I can do so?
clear all
close all
clc
fun=@(x)((x(1)-10*x(2)).^2)+(5*(x(3)-x(4))^2)+((x(2)-2*x(3))^4)+(10*(x(1)-x(4))^2);
x0=[1,2,3,4];
[x,fval]=fminunc(fun,x0)
options = optimoptions(@fminunc,'Display','iter','Algorithm','quasi-newton');
1 commentaire
Réponses (0)
Voir également
Catégories
En savoir plus sur Approximate Functions with Lookup Tables dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!