⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cellex.m

📁 两个画蜂窝系统的程序。第一个画出六边形蜂窝图。以(0
💻 M
字号:
% =======================================================================
% Cellex program
% DESCRIPTION: This program draws cellular figure
%=======================================================================
clear all
n=6;                 %the number of ringes of the cell.
a=0:2*pi/n:2*pi;
y0=sin(a);x0=cos(a);
p=6;q=5;              %p is the number of cells in x-axis.
                      %q is the number of cells in y-axis.
for i=(-1*p):p
    for j=(-1*q):q
        x=x0+i*1.5;
        y=y0+(j+mod(i,2)/2)*sqrt(3);
        plot(x,y),hold on
    end
end
axis equal

⌨️ 快捷键说明

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