Unformatted text preview: %% Find affine scaling search direction [dx,dy,ds]=intpt(A,b,c,x,y,s); %% Backtrack if necessary alpha=1; while min( min(x+alpha*dx),min(s+alpha*ds) ) <= 0, alpha = .5*alpha; end %% update x=x+alpha*dx;s=s+alpha*ds; y=y+alpha*dy; %% display dg = sum(x.*s); disp(['The current duality gap is: ', num2str(dg)]) disp('The search direction for x and the new x are:') [dx x] disp('The search direction for y and the new y are:') [dy y] disp('The search direction for s and the new s are:') [ds s] end disp('The optimal x and s are: ') [x s]...
View Full Document
This note was uploaded on 06/11/2011 for the course C 350 taught by Professor Wolkowicz during the Fall '97 term at Waterloo.
- Fall '97