?? max.m
字號:
function varargout = max(chr)% MAX - Returns the value ofbest member in the population. Also returns% the member and the index position in the vector if desired.% [val,mem,ind]=min(chr) The argument to the function is a vector% of type chrom, one generation. The output is% val - best member.% mem - fitness of best member% ind - the index in the vector% % See also MIN,MEAN,MEDIAN,STD% [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); [q f_ind]=max(fit); varargout{1}(k,1)=fit(f_ind); varargout{2}(k,1)=chr(k,f_ind); varargout{3}(k,1)=f_ind;end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -