这个是上个《一个实例搞定MATLAB界面编程》中的做的例子
其实,你也可以看看我写的其他的有关MATLAB的界面方面的程序,里面有些功能或许你需要的。
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 16709 2009-03-25 18:47 Examplepjimage.m
文件 16878 2009-03-25 18:46 Examplepjimage.fig
文件 7875 2008-12-26 12:16 Example ouxiang.jpg
文件 4152 2009-03-25 17:30 Exampleim2bw_args.m
文件 2655 2009-03-25 17:27 Exampleim2bw_args.fig
目录 0 2009-03-25 08:24 Example
文件 13443 2009-03-25 18:28 Examplepjimage.asv
文件 6100662 2007-06-04 17:10 Examplemandi.tif
文件 65240 2000-12-04 13:57 Examplecameraman.tif
文件 20480 2003-05-03 13:59 Examplesnowflakes.png
文件 44607 2003-01-26 01:03 Example
ice.png
----------- --------- ---------- ----- ----
6292701 11
function varargout = im2bw_args(varargin)
% IM2BW_ARGS M-file for im2bw_args.fig
% IM2BW_ARGS by itself creates a new IM2BW_ARGS or raises the existing
% singleton*.
%
% H = IM2BW_ARGS returns the handle to a new IM2BW_ARGS or the handle to
% the existing singleton*.
%
% IM2BW_ARGS(‘CALLBACK‘hobjecteventDatahandles...) calls the local
% function named CALLBACK in IM2BW_ARGS.M with the given input arguments.
%
% IM2BW_ARGS(‘Property‘‘Value‘...) creates a new IM2BW_ARGS or raises the
% existing singleton*. Starting from the left property value pairs are
% applied to the GUI before im2bw_args_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to im2bw_args_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 im2bw_args
% Last Modified by GUIDE v2.5 25-Mar-2009 12:44:36
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @im2bw_args_OpeningFcn ...
‘gui_OutputFcn‘ @im2bw_args_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
% --- Executes just before im2bw_args is made visible.
function im2bw_args_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 im2bw_args (see VARARGIN)
% Choose default command line output for im2bw_args
handles.output = hobject;
% Update handles structure
guidata(hobject handles);
% UIWAIT makes im2bw_args wait for user response (see UIRESUME)
% uiwait(handles.figure_im2bw);
h_pjimage=findobj(‘Tag‘‘figure_pjimage‘);
h_pjimage=guihandles(h_pjimage);
setappdata(handles.figure_im2bw‘h_pjimage‘h_pjimage);
% --- Outputs from this function are returned to the command line.
function varargout = im2bw_args_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 sli
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 16709 2009-03-25 18:47 Examplepjimage.m
文件 16878 2009-03-25 18:46 Examplepjimage.fig
文件 7875 2008-12-26 12:16 Example ouxiang.jpg
文件 4152 2009-03-25 17:30 Exampleim2bw_args.m
文件 2655 2009-03-25 17:27 Exampleim2bw_args.fig
目录 0 2009-03-25 08:24 Example
文件 13443 2009-03-25 18:28 Examplepjimage.asv
文件 6100662 2007-06-04 17:10 Examplemandi.tif
文件 65240 2000-12-04 13:57 Examplecameraman.tif
文件 20480 2003-05-03 13:59 Examplesnowflakes.png
文件 44607 2003-01-26 01:03 Example
ice.png
----------- --------- ---------- ----- ----
6292701 11
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)