When finding the max value of a function. How can I get the most accuarate value?
1 view (last 30 days)
We got asked to find the max value of a function using "fminbnd", got that part, the closest to the real value gets rewarded. How do I know if I could be closer?
[xa,fval1] = fminbnd(fneg,x1,x2,options1);
Abhishek Kolla on 10 Nov 2021
fminbnd function returns the point where the function takes minimum value in the given interval and fval1 need not be maximum value.
The detailed explanation can be found here : Find minimum of single-variable function on fixed interval - MATLAB fminbnd (mathworks.com)