精选优质文档-倾情为你奉上遗传算法(Genetic Algorithm)的MATLAB应用实例To use Optimization Toolbox software, you need to 1 Define your objective function in the MATLAB language, as a function file or anonymous function. 2 Define your constraint(s) as a separate file or anonymous function.首先建立目标函数的M文件;例1:如目标函数 min 100(x2-x12)+(1-x1)2 ;Function File for Objective FunctionA function file is a text file containing MATLAB commands with the extension .m. Create a new function file in any text editor, or u