资源简介
一些比较经典的MATLABgui界面的例子,对指导GUI编程很有意义

代码片段和文件信息
function varargout = ArcSimulationSoft( varargin )
% this module open the soft .
% February 2004
% $Revision: 1.00 $
if (nargin == 0) | isstruct( varargin{1} ) % LAUNCH GUI
if nargin == 1
ArcSimulationData = varargin{1} ;
else
ArcSimulationData = [] ;
end
% find if have the same figure and close it .
OldFigure = findobj( ‘type‘ ‘figure‘ ‘Tag‘ ‘ArcSimulationSoft‘ ) ;
if ishandle( OldFigure )
close( OldFigure ) ;
end
% generate a new figure .
FigureHandle = figure( ‘Visible‘ ‘off‘ ) ;
set( FigureHandle ‘Units‘ ‘pixels‘ ‘Position‘ [150 150 500 300] ...
‘Name‘ ‘电弧炉对电网影响仿真软件‘ ...
‘Tag‘ ‘ArcSimulationSoft‘ ...
‘FileName‘ ‘‘ ...
‘MenuBar‘ ‘none‘ ...
‘Numbertitle‘ ‘off‘ ...
‘Resize‘ ‘off‘ ...
‘windowstyle‘ ‘normal‘ ...
‘Visible‘ ‘off‘ ) ;
% generate the menu .
generate_MenuContent( FigureHandle ) ;
% generate the uicontrols .
generate_FigureContent( FigureHandle ) ;
% save the ArcSimulationData .
setappdata( FigureHandle ‘ArcSimulationData‘ ArcSimulationData ) ;
% display the figure .
movegui( FigureHandle ‘center‘ ) ;
set( FigureHandle ‘Visible‘ ‘on‘ ) ;
% init the data .
init_FigureContent( FigureHandle ) ;
if nargout > 0
varargout{1} = FigureHandle;
end
elseif ischar(varargin{1}) % INVOKE NAMED SUBFUNCTION OR CALLBACK
global SET_DEBUG_VALUE_IN_SIMULATOR ;
if isempty( SET_DEBUG_VALUE_IN_SIMULATOR ) | ~isnumeric( SET_DEBUG_VALUE_IN_SIMULATOR )
SET_DEBUG_VALUE_IN_SIMULATOR = 0 ;
else
end
if SET_DEBUG_VALUE_IN_SIMULATOR == 1 ;
if (nargout)
[varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard
else
feval(varargin{:}); % FEVAL switchyard
end
else
try
if (nargout)
[varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard
else
feval(varargin{:}); % FEVAL switchyard
end
catch
disp(lasterr);
end
end
end
% ------------------------------------------------------------
function generate_MenuContent( FigureHandle ) ;
% generate the file menu .
% ------------------------------------------------------------
MenuHandle = uimenu( ‘Parent‘ FigureHandle ‘Label‘ ‘文件(&F)‘ ) ;
% define the parameters of the menus .
MenuLabel = { ‘打开(&O)‘; ‘退出(&E)‘ } ;
% add Polygon at 2003.10.13 .
MenuTag = { ‘MenuOpenHistory‘; ‘MenuClose‘ } ;
MenuCallback = { ...
[‘ArcSimulationSoft( ‘‘MenuOpenHistory_Callback‘‘ gcbf)‘]; ...
[‘close all;‘] } ;
SeparatorGroup = { ‘off‘; ‘on‘ } ;
% generate the
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 429871 2004-10-04 13:00 经典例子\ArcSimulation
文件 16154 2004-10-04 13:05 经典例子\ArcSimulationSoft.m
文件 7499 2004-03-15 19:45 经典例子\ArcSoftDemo.m
文件 3893 2004-03-15 19:55 经典例子\CalculateEquation.m
文件 29740 2004-10-04 13:06 经典例子\CalculateStatusEquation.m
文件 2381 2004-03-14 01:47 经典例子\CalculateXPCoefficient.m
文件 207014 2004-02-10 00:29 经典例子\CircuitDiagram.bmp
文件 9096 2004-03-14 03:56 经典例子\Data.mat
文件 7992 2004-03-14 00:22 经典例子\DisplayEquationABMatrix.m
文件 19394 2006-05-18 10:48 经典例子\DisplayFFTResult.m
文件 29159 2006-05-18 10:47 经典例子\DisplayResult.m
文件 2457 2004-03-03 12:25 经典例子\DisplayStatusEquation.m
文件 27105 2004-10-04 13:06 经典例子\EditParameter.m
文件 32872 2000-02-04 05:25 经典例子\FigureMenuBar.fig
文件 74008 2000-02-04 05:25 经典例子\FigureToolBar.fig
文件 9386 2004-03-14 12:17 经典例子\GetDefaultArcParameter.m
文件 8369032 2004-03-15 17:23 经典例子\ImageData.mat
文件 850 2004-03-15 17:23 经典例子\ImagesTofr
文件 600294 2004-02-10 00:26 经典例子\MainCircuitFormula.bmp
文件 20480 2003-12-20 14:57 经典例子\mexrun.dll
文件 13793 2004-10-04 13:06 经典例子\SimulateFigure.m
文件 1736 2004-03-15 19:54 经典例子\SimulateModule.m
文件 123320 2004-03-15 21:04 经典例子\SimulationResult.fig
..A.SH. 10240 2005-05-21 19:25 经典例子\Thumbs.db
文件 477942 2004-02-10 01:00 经典例子\UndeePicture.bmp
文件 1026 2004-03-14 01:38 经典例子\xp.m
目录 0 2006-05-18 10:50 经典例子
----------- --------- ---------- ----- ----
10526952 28
............此处省略1个文件信息
- 上一篇:单相pwm整流器MATLAB仿真
- 下一篇:LMS算法学习曲线的matlab仿真
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论