设为首页 加入收藏

TOP

一个简单的matlab图形界面程序GUI(一)
2014-11-24 03:17:23 来源: 作者: 【 】 浏览:1
Tags:一个 简单 matlab 图形 界面 程序 GUI

一个简单的matlab图形界面程序GUI


function varargout = showGUI(varargin)
% SHOWGUI MATLAB code for showGUI.fig
% SHOWGUI, by itself, creates a new SHOWGUI or raises the existing
% singleton*.
%
% H = SHOWGUI returns the handle to a new SHOWGUI or the handle to
% the existing singleton*.
%
% SHOWGUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in SHOWGUI.M with the given input arguments.
%
% SHOWGUI('Property','Value',...) creates a new SHOWGUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before showGUI_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to showGUI_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES


% Edit the above text to modify the response to help showGUI


% Last Modified by GUIDE v2.5 08-Jun-2013 21:53:16


% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @showGUI_OpeningFcn, ...
'gui_OutputFcn', @showGUI_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end


if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


function showGUI_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to showGUI (see VARARGIN)


% Choose default command line output for showGUI
handles.output = hObject;
guidata(hObject, handles);


% UIWAIT makes showGUI wait for user response (see UIRESUME)
% uiwait(handles.showGUI);


% --- Outputs from this function are returned to the command line.
function varargout = showGUI_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)


% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on button press in runBut.
function runBut_Callback(hObject, eventdata, handles)
% hObject handle to runBut (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
maxRunTime = 10;
current_run_no = str2double(get(handles.beginValue, 'String'));
if (get(handles.rdch, 'Value') == get(handles.rdch, 'Max'))
if runtime_number_check(handles, current_run_no) == 1
current_run_no = mod((current_run_no + 1), maxRunTime);
if current_run_no == 0
current_run_no = maxRunTime;
end
set(handles.beginValue, 'String', num2str(current_run_no));
curimno = str2double(get(handles.imgNo, 'String'));
if imgno_number_check(curimno, handles) ~= -1
gui_contents_update(handles, cur

首页 上一页 1 2 3 4 5 6 下一页 尾页 1/6/6
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇如何用Java实现获得MySQL数据库中.. 下一篇队列的多种C语言实现

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·哈希表 - 菜鸟教程 (2025-12-24 20:18:55)
·MySQL存储引擎InnoDB (2025-12-24 20:18:53)
·索引堆及其优化 - 菜 (2025-12-24 20:18:50)
·Shell 中各种括号的 (2025-12-24 19:50:39)
·Shell 变量 - 菜鸟教 (2025-12-24 19:50:37)