Optimization: principles and algorithms, by Michel Bierlaire
run1702.m
Go to the documentation of this file.
1 %> \file
2 %> Runs example 17.2 of \cite Bier15-book (Tables 17.1 and 17.2)
3 %>
4 %> @note Calls \ref projectedGradient
5 %>
6 %> @ingroup Running
7 %> @ingroup chap17
8 %> @author Michel Bierlaire
9 %> @date Sun Mar 22 15:10:27 2015
10 
11 A = [-1 1] ;
12 b = -1 ;
13 x0 = [3.5 ; 2.5] ;
14 eps = 1.0e-6 ;
15 [solution, iteres, niter] = projectedGradient('ex1101',A,b,x0,eps);
16 format short e
17 iteres(1:niter,:)
18 solution
19 format
20 niter
21 
22 [solution, iteres, niter] = projectedGradient('ex1101',A,b,x0,eps,0.1);
23 format short e
24 iteres(1:niter,:)
25 solution
26 format
27 niter
28 
29 
function projectedGradient(in obj, in A, in b, in x0, in eps, in gamma)
Applies the projected gradient method to solve subject to .
function ex1101(in x)
Example 11.1 in .
Copyright 2015-2018 Michel Bierlaire