Unconstrained Optimization using fminunc and plotting convergence history

3 ビュー (過去 30 日間)
ANOSH PHIROZ AMARIA
ANOSH PHIROZ AMARIA 2018 年 10 月 31 日
コメント済み: Walter Roberson 2018 年 10 月 31 日
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');

回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by