function varargout = gui3(varargin)
% GUI3 MATLAB code for gui3.fig
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @gui3_OpeningFcn, ...
'gui_OutputFcn', @gui3_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 gui3 is made visible.
function gui3_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 gui3 (see VARARGIN)
% Choose default command line output for gui3
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes gui3 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = gui3_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;
% --------------------------------------------------------------------
function xs_Callback(hObject, eventdata, handles)
% hObject handle to xs (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function jm1_Callback(hObject, eventdata, handles)
% hObject handle to jm1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
h2=[handles.axes2 handles.ims];
set(h2,'Visible','off');
h1=[handles.axes1 handles.sin handles.cle];
set(h1,'Visible','on');
try
delete(allchild(handles.axes2));
end
% --------------------------------------------------------------------
function jm2_Callback(hObject, eventdata, handles)
% hObject handle to jm2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
h2=[handles.axes2 handles.ims];
set(h2,'Visible','on');
h1=[handles.axes1 handles.sin handles.cle];
set(h1,'Visible','off');
% --- Executes on button press in cle.
function cle_Callback(hObject, eventdata, handles)
% hObject handle to cle (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
try
delete(allchild(handles.axes1));
end
% --- Executes on button press in sin.
function sin_Callback(hObject, eventdata, handles)
% hObject handle to sin (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ezplot(handles.axes1,'sin(x)');
% --- Executes on button press in ims.
function ims_Callback(hObject, eventdata, handles)
% hObject handle to ims (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
axis(handles.axes2);
imshow('pout.tif');
评论0