gezhuangtu.m

来自「实现(2」· M 代码 · 共 36 行

M
36
字号
function gezhuangtu


length=input('input the restric length of the coding\n');
%画点
for x=0:1:6*(length-1)
    for y=0:1:(2^(length-1)-1)
    point=plot(x,y,'ro');
    hold on
    end
end

%画虚线
for x=0:1:6*(length-1)-1
    for y=0:1:(2^(length-1)-1)
    xuxian=plot([x,x+1],[y,(fix(y*0.5)+2^(length-1-13))],'--');
    hold on
    end
end

%画实线    
for x=0:1:6*(length-1)-1
    for y=0:1:(2^(length-1)-1)
    shixian=plot([x,x+1],[y,(fix(y*0.5))],'g');
    hold on
    end
end
end
    
end



    
    

⌨️ 快捷键说明

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