Page 322 - MATLAB an introduction with applications
P. 322
Optimization ——— 307
The complete flow chart of the method is shown in Fig. E5.26(b).
start
Select N=2,
U vector as eye(N) i.e., U and U 2
1
Set start X 1
Maximum iterations n
i=1
Set P 0 =X i
k=1
Find λ k that minimizes f(P k–1 )
Update P k =P k–1 +λ k U k
k=k+1
yes
Is k≤N
No
i=i+1
U j =U j+1 , for j=1,2,…N–1
U N =P N –P 0
. Find λ that minimizes f(P 0 +λU N )
X i =P o +λU N
yes
Is i≤n
No
Print X i , f(P o +λU N )
stop
Fig. E5.26 (b)