makel.m

来自「这是一个超宽带的源码」· M 代码 · 共 16 行

M
16
字号
% Make links of all the pairs of nodes. % Some heuristics might be added latter.function L = makeL(coord)    N = size(coord,1);    L = zeros(N*(N-1),2);        for i=1:N*(N-1)        si = floor((i-1)/(N-1))+1;        di = mod(i-1,N-1)+1;        if di >= si            di = di+1;        end        L(i,:) = [si,di];    end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?