THMMY's "Optimization Techniques" course assignments.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526272829303132333435363738
  1. %
  2. % The main script for the assignment.
  3. % * Calls the bisection method for different epsilon values (Question 1)
  4. % * Calls every method for different lambda values, in order to plot
  5. % the iterations needed. (All questions, part A)
  6. % * Calls every method for 3 different lambda values, in order to plot
  7. % the [a, b] convergence. (All questions part B)
  8. %
  9. disp (" ");
  10. disp (" ");
  11. disp ('1. Number of iterations for different epsilon values for min_bisection');
  12. disp ('----');
  13. bisection_over_epsilon;
  14. methods = {
  15. @min_bisection;
  16. @min_golden_section;
  17. @min_fibonacci;
  18. @min_bisection_der
  19. };
  20. disp (" ");
  21. disp (" ");
  22. disp ('2. Number of iterations for different lambda values');
  23. disp ('----');
  24. for i = 1:length(methods)
  25. iterations_over_lambda(methods{i});
  26. end
  27. disp (" ");
  28. disp (" ");
  29. disp ('3. [a, b] interval convergence');
  30. disp ('----');
  31. for i = 1:length(methods)
  32. interval_over_iterations(methods{i});
  33. end