?? cellex.m
字號(hào):
% =======================================================================
% 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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -