histsave.asv
来自「粒子群算法」· ASV 代码 · 共 23 行
ASV
23 行
clear;
clc;
histPlot=zeros(1,2001);
iCount=0;
resultGood = 100000;
for i=1:2
Result = PSO();
legth = length(Result)
if (resultGood > Result(legth))
resultGood =Result(legth);
end
%if (Result(legth)<5)
iCount= iCount+1;
histPlot = histPlot+Result;
%end
end
histPlot = histPlot./iCount;
legth = length(histPlot)
plot(1:legth,histPlot(1:legth));
axis([0 legth-1 0 600]);
resultGood
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?