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

📄 initial.m

📁 用matlab实现带有动画演示的加尔顿顶板演示
💻 M
字号:
function Initial
%When GUI is opened, this function will be called to give the initial
%appearance to the user

global H_axes1
global H_axes2
global TIMES

TIMES=0;         %TIMES is used for recording the total algebraic times of pressing the buttons with respect to changing the speed

%a and b matrix represent the location of the nails
a=[-1,0,1,2,3,4,5,1,2,3,4,1.5,2.5,3.5,2,3,2.5,6];
b=[-1,0,0,0,0,0,0,1,1,1,1,2,2,2,3,3,4,6];

%Set the location of the frame
a1=[1,1];a2=[2,2];a3=[3,3];a4=[4,4];
b1=[0,1];
a5=[1.5,1.5,0,0,5,5,3.5,3.5];
b5=[5,4,1,0,0,1,4,5];
 
%Draw two axes and then get their handles
H_axes1=axes('Position',[0.061,0.402,0.435,0.46],'Box','on');
H_axes2=axes('Position',[0.061,0.172,0.435,0.231],'Box','on');

%Draw the initial appearance
plot(H_axes1,a,b,'k.',a1,b1,a2,b1,a3,b1,a4,b1,a5,b5,'y','MarkerSize',10,'LineWidth',3);
axis(H_axes2,[-1,6,0,1.2])
set(H_axes1,'XTick',[],'YTick',[]);
set(H_axes2,'XTick',[]);

⌨️ 快捷键说明

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