Single Variable Optimization Examples Matlab