THMMY's "Optimization Techniques" course assignments.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

38 wiersze
931 B

  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