- To find multiple values of function ‘f’, first step is to pre-allocate memory in which those values can be stored in.
- Utilize the ‘islocalmin’ function to identify all the local minima. For more information on the ‘islocalmin’ function, refer to this documentation: https://www.mathworks.com/help/matlab/ref/islocalmin.html .
- Use ‘min’ function, to find value and index of function ‘f’ at global minima. Refer to this documentation for more information on ‘min’ function: https://www.mathworks.com/help/matlab/ref/min.html .