Create an anonymous function for fx 20x2 200x 3 and use i
Create an anonymous function for f(x) = 20x^2 - 200x + 3 and use it To plot the function to determine the approximate location of its minimum. With the fminbnd function to precisely determine the location of the minimum.
Solution
To find the minimum of the function f(x) = 20x2 – 200x + 3 first you have to define an interval, for example: (4,6), create an anonymous function f
a)
To plot the function:
plot(f);
b)
Then invoke fminbnd with
The result is
The value of the function at the minimum is
