⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perf2.m

📁 收集的GA的一些源程序
💻 M
字号:
function [out]=perf(in,x,y,h,id);
%
% Calculates the performance of a given
% set of parameters that have been decoded
% from the population members.
% Works for the whole population.
%
global stop;

[D L]=size(in);

for i = 1 : D
	if stop == 1
		break;
	end
	if id == 1
		set(h,'position',[410 25 180*(i/D) 20]);
	else
		set(h,'position',[410 65 180*(i/D) 20]);
	end
	p2=in(i,:);
	x2=pol2(x,p2);
	c2=inv(x2'*x2)*x2'*y;
	yest=x2*c2;
	out(i,1)=sum((y-yest).^2);
end

⌨️ 快捷键说明

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