📄 cellex.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 + -