1、 啓動
% 獲取當前文件所在路徑
currPath = fileparts(mfilename('fullpath'));
% 切換工作路徑到當前位置
cd(currPath);
% 判斷所用操作系統
if computer == 'PCWIN'
% MATLAB版本號
v = version;
if v(1)~='7'
warndlg ('Only run in matlab 7.x(R14.x)');
return
else
% 添加當前路徑下的所有子目錄
addpath(genpath(pwd));
addpath(genpath(currPath));
end
end
2、 在GUI中使用Axes控件