📄 perf4.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);
[D1 L1]=size(x);
for i = 1 : D
if stop == 1
break;
end
if id == 1
set(h,'position',[380 25 180*(i/D) 20]);
else
set(h,'position',[380 65 180*(i/D) 20]);
end
f2=in(i,:);
x2=fil(x,f2);
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 + -