Dmitrey

bench 2 - intsolver

Mar 26th, 2011
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.45 KB | None | 0 0
  1. f = @(x) x(1)/(x(2)+1e-15) + x(3)/(x(4)+1e-15) + x(5)/(x(6)+1e-15) + x(6)/(x(1)+1e-15) + 1e-7*(x(1)+x(2)+x(3)+x(4)+x(5)+x(6));
  2. opts = intoptimset();
  3. opts(1) = 1e-9; % ftol
  4. x0 = [infsup(0,1), infsup(0,1), infsup(0,1),infsup(0,1), infsup(0,1), infsup(0,1)];
  5. tic
  6. x = intminunc(f, x0,opts)
  7. toc
  8.  
  9.  
  10.  ite     evf     evg     evi     evh     min         nsol    nlist   completed
  11.  
  12.  0   1   0   0   0   Inf     0   1   0.000
  13. x =
  14.      []
  15. Elapsed time is 0.072212 seconds.
Advertisement
Add Comment
Please, Sign In to add comment