MATLAB: How to find minimum point at endpoint in matlab, please help.

endpointminimumwrong

clc,clear
f = @(x)((15*x)./(4*x.^2-3*x+4));
x = fminbnd(f, 0, 10);
x
y=f(x);
y
this code returns
x =
9.9999
y =
0.4011
while the real minimum is at x=0 and y=0, because of this explanation "The algorithm is based on golden section search and parabolic interpolation. Unless the left endpoint x1 is very close to the right endpoint x2, fminbnd never evaluates fun at the endpoints, so fun need only be defined for x in the interval x1 < x < x2. If the minimum actually occurs at x1 or x2, fminbnd returns an interior point at a distance of no more than 2*TolX from x1 or x2, where TolX is the termination tolerance."
how can i find the real minimum even in endpoints? please help me.

Best Answer

fminbnd() is not suitable for application to functions with multiple minima. Evaluating at the endpoints would, at best, be a hack that would not help in more general cases.
You should not be using fminbnd() on that function. You should be using a global minimizer.