[求助]关于一个varargin函数的问题
<P>function lbox2_OpeningFcn(hObject, eventdata, handles, varargin)<BR>% This function has no output args, see OutputFcn.<BR>% hObject handle to figure<BR>% eventdatareserved - to be defined in a future version of MATLAB<BR>% handles structure with handles and user data (see GUIDATA)<BR>% varargin command line arguments to untitled (see VARARGIN)</P><P>% Choose default command line output for lbox2<BR>handles.output = hObject;</P>
<P>% Update handles structure<BR>guidata(hObject, handles);</P>
<P>if nargin == 3,<BR> initial_dir = pwd;<BR>elseif nargin == 4 & exist(<FONT color=#0909f7>varargin{1},</FONT>'dir')<BR> initial_dir = varargin{1};<BR>else<BR> errordlg('Input argument must be a valid directory','Input <BR>Argument Error!')<BR> return<BR>end<BR>% Populate the listbox<BR>load_listbox(initial_dir,handles)<BR><BR>函数中蓝色部分所指为谁?是function lbox2_OpeningFcn(hObject, eventdata, handles, varargin)这四个输入变量中的第一个吗?是不是在此判断<BR>hObject为一个dir类型?<BR>我想确定一下。</P> 试试就知道了
页:
[1]