PSO粒子群算法问题,运行之后出现Subscript indices must either be real positive integers or logicals
Subscriptindicesmusteitherberealpositiveintegersorlogicals.ErrorinInitSwarm(line59)Pa...
Subscript indices must either be real positive integers or logicals.
Error in InitSwarm (line 59)
ParSwarm(k,2*ParticleSize+1)=AdaptFunc(ParSwarm(k,1:ParticleSize));
Error in PsoProcess (line 81)
[ParSwarm,OptSwarm]=InitFunc(SwarmSize,ParticleSize,ParticleScope,AdaptFunc);
Error in psomain (line 367)
[Result,OnLine,OffLine,MinMaxMeanAdapt]=PsoProcess(20,365,ParticleScope,@InitSwarm,@BaseStepPSO,AdaptFunc,0,0,4000,0) 展开
Error in InitSwarm (line 59)
ParSwarm(k,2*ParticleSize+1)=AdaptFunc(ParSwarm(k,1:ParticleSize));
Error in PsoProcess (line 81)
[ParSwarm,OptSwarm]=InitFunc(SwarmSize,ParticleSize,ParticleScope,AdaptFunc);
Error in psomain (line 367)
[Result,OnLine,OffLine,MinMaxMeanAdapt]=PsoProcess(20,365,ParticleScope,@InitSwarm,@BaseStepPSO,AdaptFunc,0,0,4000,0) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询