std.m
来自「一些经典遗传算法问题的matlab程序调度问题分配问题等等」· M 代码 · 共 22 行
M
22 行
function dev = std(chr)
% STD - Standard deviation
% For vectors, STD(chr) returns the standard
% deviation of the population. For matrices, STD(chr) is a column vector
% containing the standard deviation of each row.
%
% STD(chr) normalizes by (N-1) where N is the sequence length. This
% makes STD(X).^2 the best unbiased estimate of the variance if X
% is a sample from a normal distribution.
%
% See Also MAX,MIN,MEAN,MEDIAN
[m n]=size(chr);
for k=1:m
for l=1:n
fit(l)=get(chr(k,l),'fitness');
end
dev(k,1)=std(fit);
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?