This is a quadratic function of x, a scalar variable? While fminbnd seems simple enough, high school algebra should suffice too. There are too many undefined variables listed be sure what your problem really is, as well as an unreadable function as you have inserted it. Are some of those x's multiplication symbols?
If really is just a quadratic, then the min occurs either at an end point of the interval, or at the minimum of the quadratic.
fminbndis a function file. The algorithm is based on golden section search and parabolic interpolation. Unless the left endpointx1is very close to the right endpointx2,fminbndnever evaluatesfunat the endpoints, sofunneed only be defined forxin the intervalx1<x<x2.
If the minimum actually occurs atx1orx2,fminbndreturns a pointxin the interior of the interval (x1,x2) that is close to the minimizer. In this case, the distance ofxfrom the minimizer is no more than2*(TolX + 3*abs(x)*sqrt(eps)). See[1]or[2]for details about the algorithm.
[1] Forsythe, G. E., M. A. Malcolm, and C. B. Moler.Computer Methods for Mathematical Computations. Englewood Cliffs, NJ: Prentice Hall, 1976.
[2] Brent, Richard. P.Algorithms for Minimization without Derivatives. Englewood Cliffs, NJ: Prentice-Hall, 1973.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.