Dmitrey

bench 1 - intsolver

Mar 26th, 2011
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.43 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);
  2. opts = intoptimset();
  3. opts(1) = 1e-9; % required precision
  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. Output:
  11.  ite     evf     evg     evi     evh     min         nsol    nlist   completed
  12.  
  13.  0   1   0   0   0   Inf     0   1   0.000
  14. x =
  15.      []
  16. Elapsed time is 0.201721 seconds.
Advertisement
Add Comment
Please, Sign In to add comment