software_english.m

来自「一个遗传规划的源程序」· M 代码 · 共 20 行

M
20
字号
x = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16];
w = [1 1 1 5 4 24 6 14 33 1 30 22 13 22 77 7];
y = cumsum(w);
% g = ((x).*sqrt((x)-cos((((x)-log(x))+sin((x).^cot(x))).*tan(x)))).*sqrt(x) % 1687.3

g = abs(1.0112*((x).*sqrt((x)-cos((((x)-log(x))+sin((x).^cot(x))).*tan(x)))).*sqrt(x)-2.9678)

plot(x,g,'LineWidth',1,'Color','r','LineStyle',':');
hold on;

plot(x,y,'LineWidth',1,'Color','b','LineStyle',':');
hold off

legend('GP New Model','Real Failure Data Set',2);
title('Software Failure Data--Armored Force Engineering Institute Testing Case','FontName','Times New Roman' ,'FontSize',12);
xlabel('The Number of Software Testing','FontName','Times New Roman' ,'FontSize',12);
ylabel('The Next Failure Time','FontName','Times New Roman' ,'FontSize',12);

grid on

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?