由于左侧的大小为1 x-14,右侧的大小为14 x-14,因此无法执行作业。

9次观看(最近30天)
由于左侧的大小为1 x-14,右侧的大小为14 x-14,因此无法执行作业。
SSA中的错误(第87行)
tp = salppositions(i,:)> ub'; tm = salppositions(i,:)
main_ssa中的错误(第16行)
[Best_score,Best_pos,SSA_cg_curve]=SSA(SearchAgents_no,Max_iteration,lb,ub,dim,fobj);
>>

接受的答案

沃尔特·罗伯森(Walter Roberson)
您的UB和LB需要是列向量,而不是行向量。
2条评论
沃尔特·罗伯森(Walter Roberson)
问题准备
DIM = 14;
ub = 1.1 *一个(dim,1);
lb = 0.05 * ones(dim, 1);
fobj = @ofun;
%--------------------------------------------------------------------------
searchagents_no = 20;%number of population
max_iteration = 1000;%number of iteration
%%
[Best_score,Best_pos,SSA_cg_curve]=SSA(SearchAgents_no,Max_iteration,lb,ub,dim,fobj);

登录发表评论。

更多答案(2)

艾伦·魏斯(Alan Weiss)
错误的声明是明确的:你的任务(装备ality) statement has a 1-by-14 vector on the left and a 14-by-14 matrix on the right. Take a look at line 87 of your SSA function to see what is wrong. Are those the expected sizes of the variables?
艾伦·魏斯(Alan Weiss)
MATLABmathematical toolbox documentation
1条评论
Tahseen Alshmary
Tahseen Alshmary 2021年10月6日
I do not know
我的服装者是:
问题准备
DIM = 14;
ub = 1.1 * ones(1, dim);
lb = 0.05 *一个(1,昏暗);
fobj = @ofun;
%--------------------------------------------------------------------------
searchagents_no = 20;%number of population
max_iteration = 1000;%number of iteration
%%
[Best_score,Best_pos,SSA_cg_curve]=SSA(SearchAgents_no,Max_iteration,lb,ub,dim,fobj);

登录发表评论。


标签

下载188bet金宝搏


Release

R2021A

社区寻宝

在Matlab Central中找到宝藏,发现社区如何为您提供帮助!

Start Hunting!

被某某人翻译