你是不是和我一样呢?
进来吧,发表你不懂的问题,讲讲你的看法
这里是你我的舞台,再幼稚的问题也要有勇气说出来
来吧,说出你的问题。这里的每个新手 都会用心的回答你的每一个问题。
[此贴子已经被作者于2006-11-20 17:49:53编辑过]
你好,能解释一下以下gui个部分的功能吗
function varargout = eggui3(varargin)
% EGGUI3 M-file for eggui3.fig
% EGGUI3, by itself, creates a new EGGUI3 or raises the existing
% singleton*.
%
% H = EGGUI3 returns the handle to a new EGGUI3 or the handle to
% the existing singleton*.
%
% EGGUI3('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in EGGUI3.M with the given input arguments.
%
% EGGUI3('Property','Value',...) creates a new EGGUI3 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before eggui3_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to eggui3_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 eggui3
% Last Modified by GUIDE v2.5 25-Oct-2006 20:33:17
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @eggui3_OpeningFcn, ...
'gui_OutputFcn', @eggui3_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 eggui3 is made visible.
function eggui3_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 eggui3 (see VARARGIN)
% Choose default command line output for eggui3
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes eggui3 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = eggui3_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 during object creation, after setting all properties.
function figure1_CreateFcn(hObject, eventdata, handles)
% hObject handle to figure1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
function zeta_edit_Callback(hObject, eventdata, handles)
% hObject handle to zeta_edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of zeta_edit as text
% str2double(get(hObject,'String')) returns contents of zeta_edit as a double
z=str2num(get(handles.zeta_edit,'string'));
t=0:0.1:15;
cla;
%plot(t,sin(t));
for k=1:length(z)
y(:,k)=step(1,[2*z(k),1],t);
line(t,y(:,k));
end
% --- Executes during object creation, after setting all properties.
function zeta_edit_CreateFcn(hObject, eventdata, handles)
% hObject handle to zeta_edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in gridon_push.
function gridon_push_Callback(hObject, eventdata, handles)
% hObject handle to gridon_push (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
grid on;
% --- Executes on button press in gridoff_push.
function gridoff_push_Callback(hObject, eventdata, handles)
% hObject handle to gridoff_push (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
grid off;
% --------------------------------------------------------------------
function option_Callback(hObject, eventdata, handles)
% hObject handle to option (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Box_on_Callback(hObject, eventdata, handles)
% hObject handle to Box_on (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_2_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
box on;
% --------------------------------------------------------------------
function Box_off_Callback(hObject, eventdata, handles)
% hObject handle to Box_off (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
box off;