fminbnd
Find the minimum of a function in the specified interval.
(f, v)=fminbnd(func, a, b)
Inputs
func A function that returns the value of the function to be minimized for the given single argument.
a The lower limit of the interval in which the minimum has to be found.
b The upper limit of the interval in which the minimum has to be found.
Outputs
f The estimated minimum value of the function.
v The point at which the the estimated minimum is achieved.


Example
>>// From http://www.math.mtu.edu/~msgocken/ma5630spring2003/lectures/firstex/firstex/node1.html  
>>function func(t,m)
>	VECTOR t, m
>	SIZE t[n],m[n]
>	return @err
>	function err(r)
>		return sum(abs(exp(-r*t)-m))
>	end
>end
>>t=[1:10]'
>>m=[.7927 .6420 .4995 .4139 .3046 .2651 .2192 .1904 .1463 .1190]'
>>(f,r)=fminbnd(func(t,m),0,20)
>>f,r
       0.0982       0.2213
>>tf=[0:.05:10]
>>yf=exp(-r*tf)
>>plot(t,m,'df',tf,yf)
>>legends({'Observed data','Fitted data'},Legends.SW)
>>title('Decay constant from observed data')
>>xlabel('Time')
>>ylabel('Residual Mass Fraction')