main.m

来自「the ultimate collection of optimization 」· M 代码 · 共 31 行

M
31
字号
% Draw some cyclic graph.

n = 11;

S{1} = [-1,1];
S{2} = [-2,2];
S{3} = [-3,3];

k = 0;
for n=[11 12]
for s = 1:3
    
    k = k+1;
    SS = S{s};
    subplot(2,3,k);
    [A,xy] = gen_cyclic_graph(n,SS);
    gplot( A,xy, 'k.-' );
    axis([-1,1,-1,1]);
    axis square;
    axis off;
    str = [];
    for i=1:length(SS)
        str = [str, sprintf('%d', SS(i))];
        if i~= length(SS)
            str = [str, ','];
        end
    end
    title( sprintf('G=Z/%dZ, S=[%s]', n, str) );
    
end
end

⌨️ 快捷键说明

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