Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 工程数学软件 > MATLAB论坛
MATLAB论坛 一切MATLAB相关问题在此讨论。
 
 
主题工具 显示模式
旧 2008-08-22, 16:24   #1
shunyu
初级会员
 
注册日期: 2008-08-21
年龄: 38
帖子: 1
声望力: 0
shunyu 正向着好的方向发展
默认 求助 怎么总是这个界面啊

function y = my_fun(x)
y = {cos(2*x(1)+1)+2*cos(3*x(1)+2)+3*cos(4*X(1)+3)+4*cos(5*x(1)+4)+5*cos(6*x(1)+5)}*{cos(2*x(2)+1)+2*cos(3*x(2)+2)+3*cos(4*x(2)+3)+4*cos(5*x(2)+4)+5*cos(6*x(2)+5)};

FitnessFunction = @my_fun;
numberOfVariables=2;
x0=[-10 -10];
LB=[-10 -10];
UB=[10 10];
range = [LB(1) UB(1); LB(2) UB(2)];
[x,fval] = ga(FitnessFunction,numberOfVariables,LB,UB)
??? Error using ==> gads\private\aluform
The number of rows in A must be the same as the length of b.

Error in ==> gads\private\galincon at 123
[Iterate,A,L,U,nineqcstr,neqcstr,ncstr,IndIneqcstr,IndEqcstr,msg,EXITFLAG] = ...

Error in ==> ga at 254
[x,fval,exitFlag,output,population,scores] = galincon(FUN,GenomeLength,Aineq,Bineq,Aeq,Beq,LB,UB,options);
:cry: :cry: :cry: :cry: :cry:
怎么搞得啊?
题目是::试利用Matlab遗传算法工具箱求解下列最小值问题。
shunyu 当前离线   回复时引用此帖
 


发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码



所有时间均为北京时间。现在的时间是 11:07


Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.