THMMY's "Optimization Techniques" course assignments.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GivenEnv.m 472 B

1234567891011121314151617
  1. %
  2. % Select the given interval: [-1,3]
  3. a_0 = -1;
  4. b_0 = 3;
  5. % Setup the functions under test
  6. syms x;
  7. f_1 = (x-2)^2 + x*log(x+3);
  8. f_2 = exp(-2*x) + (x-2)^2;
  9. f_3 = exp(x)*(x^3 - 1) + (x-1)*sin(x);
  10. funs = [f_1; f_2; f_3];
  11. % Setup the function titles
  12. title_f1 = "$f_1(x) = (x - 2)^2 + x \cdot \ln(x + 3)$";
  13. title_f2 = "$f_2(x) = e^{-2x} + (x - 2)^2$";
  14. title_f3 = "$f_3(x) = e^x \cdot (x^3 - 1) + (x - 1) \cdot \sin(x)$";
  15. titles = [title_f1; title_f2; title_f3];