-
Notifications
You must be signed in to change notification settings - Fork 7
/
opt15_run.m
26 lines (25 loc) · 897 Bytes
/
opt15_run.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
%% OPT15_RUN
%
% Modified:
%
% 08 January 2008
%
%---------------------------------------------------------------------
% Gene's test problem
%---------------------------------------------------------------------
fprintf('---------------------------------------------------------\n')
fprintf('Running testcase_15: exact solutions (, )\n')
fprintf('---------------------------------------------------------\n')
fname = 'opt15_fgh';
options = [];
options.verbose = 0;
options.max_iterations = 40;
options.max_fevals = 40;
options.method = 'secant';
fprintf('Newton:\n')
options.globalization = 'trust_region';
x0 = [ -1; 0 ];
x = entrust(fname, x0, options);
fprintf('Newtons method produced (%10.7e,%10.7e)\n\n',x(1),x(2))
f = opt15_fgh ( x, 'f' );
fprintf('Value of F(X) = %10.7e\n', f );