MATLAB: Local minimum and global minimum of a function

functionsglobal minimumlocal minimum

Hi!
I need to obtain the first local minimum as well as the global minimum of this function for t>0.
CV_inf = @(T) T.*(4/(n+1)) - (1/2*pi)*integral(psitildasq,(-T),(T),'Arrayvalued',true);
where
psitildasq = @(t) (1/n^2)*sum((cos(x.*t))).^2 + (1/n^2)*sum((sin(x.*t))).^2;
n is the size of vector x.
Beacause fmnbnd and fminsearch may give local minimum of a function, are there other functions that I can use? If so is there an option I could specify to obtain the first local minimum?
Thanks.

Best Answer

patternsearch() from the Global Optimization Toolbox might be appropriate for the global minimum.
Related Question