?? sort.m
字號:
function varargout = sort(chr)% SORT - Sort in ascending order. For a vector of chromosomes, sort(x)% sorts the objects of x in ascending order, with the respect to% the fitness of the chromosomes. % [y i] = sort(x) also returns an index vector.for k=1:length(chr) tmp(k)=chr(k).fitness;end[q ind]=sort(tmp);varargout{1}=chr(ind);varargout{2}=ind;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -