📄 populationindicies.m
字号:
function indicies = populationIndicies(population)
%POPULATIONINDICIES Find the indicies of each sub-population
% indicies = populationIndicies(population); returns a 2 by n array
% containing the locations of each subpopulation in the population aray.
% Copyright 2004 The MathWorks, Inc.
% $Revision: 1.4 $ $Date: 2004/01/16 16:50:03 $
lengths = cumsum(population);
lengths = lengths(1:(end-1));
starts = [1, 1 + lengths];
ends = starts + population - 1;
indicies = [starts;ends];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -