genplot.m
来自「利用GA算法实现软件测试的测试用例选取」· M 代码 · 共 25 行
M
25 行
function genplot(x,i,stats,xopt,bf,flag)%GENPLOT Graphing routine for genetic algorithm.% GENPLOT(X,I,STATS,XOPT,BF,FLAG) is a template graphing% routine for the genetic algorithm (GENETIC.M). Inputs are% X - present population if FLAG=1,2 or% population bounds if FLAG=0% I - index of most fit in present population% STATS - statistics to date% XOPT - best X to date% BF - best fitness to date% FLAG - 0 initialize (i.e. called before any procreation)% 1 BF improved since last call to GENPLOT% 2 BF has not improved since last call%% Copyright (c) 1993 by the MathWorks, Inc.% Andrew Potvin 1-10-93.if flag==1, line(xopt(1),xopt(2),'LineStyle','o','EraseMode','bac') text(xopt(1)+0.05,xopt(2)+0.05,int2str(size(stats,1)-1),'Er','bac') drawnowend% end genplot
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?