- 积分
- 46
- 注册时间
- 2007-4-28
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2011-3-3 09:03:19
|
显示全部楼层
来自 河北廊坊
- function [x,fval,exitflag,output,population,score] = test20110303(nvars)
- % This is an auto generated MATLAB file from Optimization Tool.
- % Start with the default options
- options = gaoptimset;
- % Modify options setting
- options = gaoptimset(options,'Display', 'off');
- [x,fval,exitflag,output,population,score] = ...
- ga(@(x)myfun(x,1),nvars,[],[],[],[],[],[],[],options);
复制代码 上述程序中函数- function y=myfun(x,a)
- % written by BB
- y=x^2+a;
复制代码 希望对你有所帮助 |
评分
-
1
查看全部评分
-
|