📄 dtwexpogui.m
字号:
'Units','normalized',...'HorizontalAlignment','right',...'Position',[0.0273972602739726 0.411764705882353 0.5 0.111111111111111],...'String','Window Skip',...'Style','text',...'Tag','text20',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'text21';h37 = uicontrol(...'Parent',h32,...'Units','normalized',...'HorizontalAlignment','left',...'Position',[0.801369863013699 0.581699346405229 0.198630136986301 0.111111111111111],...'String','(ms)',...'Style','text',...'Tag','text21',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'text23';h38 = uicontrol(...'Parent',h32,...'Units','normalized',...'HorizontalAlignment','left',...'Position',[0.801369863013699 0.42483660130719 0.198630136986301 0.111111111111111],...'String','(ms)',...'Style','text',...'Tag','text23',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'text16';h39 = uicontrol(...'Parent',h32,...'Units','normalized',...'HorizontalAlignment','left',...'Position',[0.106951871657754 0.86784989147938 0.449197860962567 0.111111111111111],...'String','Vector Type',...'Style','text',...'Tag','text16',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'datatype';h40 = uicontrol(...'Parent',h32,...'Units','normalized',...'BackgroundColor',[1 1 1],...'Callback','dtwexpogui(''datatype_Callback'',gcbo,[],guidata(gcbo))',...'Position',[0.106951871657754 0.736831664682954 0.588235294117647 0.130434782608696],...'String',{ 'Cepstrum'; 'MFCC'; 'LPC' },...'Style','popupmenu',...'Value',1,...'CreateFcn', {@local_CreateFcn, 'dtwexpogui(''datatype_CreateFcn'',gcbo,[],guidata(gcbo))', appdata} ,...'Tag','datatype',...'Behavior',get(0,'defaultuicontrolBehavior'));appdata = [];appdata.lastValidTag = 'analyze';h41 = uicontrol(...'Parent',h32,...'Units','normalized',...'Callback','dtwexpogui(''analyze_Callback'',gcbo,[],guidata(gcbo))',...'Position',[0.647058823529412 0.0331279609792515 0.320855614973262 0.130434782608696],...'String','Analyze',...'Tag','analyze',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'play_test';h42 = uicontrol(...'Parent',h1,...'Units','characters',...'Callback','dtwexpogui(''play_test_Callback'',gcbo,[],guidata(gcbo))',...'Position',[20.6494325346784 14.4927536231884 5.67465321563682 1.5],...'String','Play',...'Tag','play_test',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'refinfo';h43 = uicontrol(...'Parent',h1,...'Units','normalized',...'BackgroundColor',[1 1 1],...'Callback','dtwexpogui(''refinfo_Callback'',gcbo,[],guidata(gcbo))',...'HorizontalAlignment','left',...'Max',10,...'Position',[0.382867132867133 0.0027972027972028 0.300699300699301 0.0951048951048951],...'String','',...'Style','edit',...'CreateFcn', {@local_CreateFcn, 'dtwexpogui(''refinfo_CreateFcn'',gcbo,[],guidata(gcbo))', appdata} ,...'Tag','refinfo',...'Behavior',get(0,'defaultuicontrolBehavior'));appdata = [];appdata.lastValidTag = 'text17';h44 = uicontrol(...'Parent',h1,...'Units','normalized',...'HorizontalAlignment','left',...'Position',[0.375874125874126 0.20979020979021 0.115384615384615 0.0237762237762238],...'String','Test Info',...'Style','text',...'Tag','text17',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'testinfo';h45 = uicontrol(...'Parent',h1,...'Units','normalized',...'BackgroundColor',[1 1 1],...'Callback','dtwexpogui(''testinfo_Callback'',gcbo,[],guidata(gcbo))',...'HorizontalAlignment','left',...'Max',5,...'Position',[0.382867132867133 0.118881118881119 0.300699300699301 0.0951048951048951],...'String','',...'Style','edit',...'CreateFcn', {@local_CreateFcn, 'dtwexpogui(''testinfo_CreateFcn'',gcbo,[],guidata(gcbo))', appdata} ,...'Tag','testinfo',...'Behavior',get(0,'defaultuicontrolBehavior'));appdata = [];appdata.lastValidTag = 'uipanel2';h46 = uipanel(...'Parent',h1,...'Title','Time Alignment',...'Position',[0.715535718881319 0.00263504611330698 0.26332817400064 0.235836627140975],...'Tag','uipanel2',...'Behavior',get(0,'defaultuipanelBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'text29';h47 = uicontrol(...'Parent',h46,...'Units','normalized',...'HorizontalAlignment','left',...'Position',[0.101604278074866 0.786214380732337 0.449197860962567 0.130434782608696],...'String','Policy',...'Style','text',...'Tag','text29',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'policymenu';h48 = uicontrol(...'Parent',h46,...'Units','normalized',...'BackgroundColor',[1 1 1],...'Callback','dtwexpogui(''policymenu_Callback'',gcbo,[],guidata(gcbo))',...'Position',[0.346938775510204 0.797385620915033 0.258503401360544 0.130718954248366],...'String',{ 'I'; 'II'; 'III'; 'IV' },...'Style','popupmenu',...'Value',4,...'CreateFcn', {@local_CreateFcn, 'dtwexpogui(''policymenu_CreateFcn'',gcbo,[],guidata(gcbo))', appdata} ,...'Tag','policymenu',...'Behavior',get(0,'defaultuicontrolBehavior'));appdata = [];appdata.lastValidTag = 'grid';h49 = uicontrol(...'Parent',h46,...'Units','normalized',...'Callback','dtwexpogui(''grid_Callback'',gcbo,[],guidata(gcbo))',...'Position',[0.101604278074866 0.619547714065671 0.8 0.130434782608696],...'String','Show Grid',...'Style','checkbox',...'Value',1,...'Tag','grid',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'contours';h50 = uicontrol(...'Parent',h46,...'Units','normalized',...'Callback','dtwexpogui(''contours_Callback'',gcbo,[],guidata(gcbo))',...'Position',[0.101604278074866 0.347942775794066 0.8 0.130434782608696],...'String','Distance Contours',...'Style','checkbox',...'Value',1,...'Tag','contours',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'optpath';h51 = uicontrol(...'Parent',h46,...'Units','normalized',...'Callback','dtwexpogui(''optpath_Callback'',gcbo,[],guidata(gcbo))',...'Position',[0.101604278074866 0.205967467152091 0.8 0.130434782608696],...'String','Optimal Path',...'Style','checkbox',...'Value',1,...'Tag','optpath',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'show_distances';h52 = uicontrol(...'Parent',h46,...'Units','normalized',...'Callback','dtwexpogui(''show_distances_Callback'',gcbo,[],guidata(gcbo))',...'Position',[0.0962566844919786 0.0454736399915973 0.5 0.130434782608696],...'String','Plot Distances',...'Tag','show_distances',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );appdata = [];appdata.lastValidTag = 'search';h53 = uicontrol(...'Parent',h46,...'Units','normalized',...'Callback','dtwexpogui(''search_Callback'',gcbo,[],guidata(gcbo))',...'Position',[0.101604278074866 0.483745244929869 0.8 0.130434782608696],...'String','Search Region',...'Style','checkbox',...'Value',1,...'Tag','search',...'Behavior',get(0,'defaultuicontrolBehavior'),...'CreateFcn', {@local_CreateFcn, '', appdata} );hsingleton = h1;% --- Set application data first then calling the CreateFcn. function local_CreateFcn(hObject, eventdata, createfcn, appdata)if ~isempty(appdata) names = fieldnames(appdata); for i=1:length(names) name = char(names(i)); setappdata(hObject, name, getfield(appdata,name)); endendif ~isempty(createfcn) eval(createfcn);end% --- Handles default GUIDE GUI creation and callback dispatchfunction varargout = gui_mainfcn(gui_State, varargin)gui_StateFields = {'gui_Name' 'gui_Singleton' 'gui_OpeningFcn' 'gui_OutputFcn' 'gui_LayoutFcn' 'gui_Callback'};gui_Mfile = '';for i=1:length(gui_StateFields) if ~isfield(gui_State, gui_StateFields{i}) error('Could not find field %s in the gui_State struct in GUI M-file %s', gui_StateFields{i}, gui_Mfile); elseif isequal(gui_StateFields{i}, 'gui_Name') gui_Mfile = [gui_State.(gui_StateFields{i}), '.m']; endendnumargin = length(varargin);if numargin == 0 % DTWEXPOGUI % create the GUI gui_Create = 1;elseif isequal(ishandle(varargin{1}), 1) && ispc && iscom(varargin{1}) && isequal(varargin{1},gcbo) % DTWEXPOGUI(ACTIVEX,...) vin{1} = gui_State.gui_Name; vin{2} = [get(varargin{1}.Peer, 'Tag'), '_', varargin{end}]; vin{3} = varargin{1}; vin{4} = varargin{end-1}; vin{5} = guidata(varargin{1}.Peer); feval(vin{:}); return;elseif ischar(varargin{1}) && numargin>1 && isequal(ishandle(varargin{2}), 1) % DTWEXPOGUI('CALLBACK',hObject,eventData,handles,...) gui_Create = 0;else % DTWEXPOGUI(...) % create the GUI and hand varargin to the openingfcn gui_Create = 1;endif gui_Create == 0 varargin{1} = gui_State.gui_Callback; if nargout [varargout{1:nargout}] = feval(varargin{:}); else feval(varargin{:}); endelse if gui_State.gui_Singleton gui_SingletonOpt = 'reuse'; else gui_SingletonOpt = 'new'; end % Open fig file with stored settings. Note: This executes all component % specific CreateFunctions with an empty HANDLES structure. % Do feval on layout code in m-file if it exists if ~isempty(gui_State.gui_LayoutFcn) gui_hFigure = feval(gui_State.gui_LayoutFcn, gui_SingletonOpt); % openfig (called by local_openfig below) does this for guis without % the LayoutFcn. Be sure to do it here so guis show up on screen. movegui(gui_hFigure,'onscreen') else gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt); % If the figure has InGUIInitialization it was not completely created % on the last pass. Delete this handle and try again. if isappdata(gui_hFigure, 'InGUIInitialization') delete(gui_hFigure); gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt); end end % Set flag to indicate starting GUI initialization setappdata(gui_hFigure,'InGUIInitialization',1); % Fetch GUIDE Application options gui_Options = getappdata(gui_hFigure,'GUIDEOptions'); if ~isappdata(gui_hFigure,'GUIOnScreen') % Adjust background color if gui_Options.syscolorfig set(gui_hFigure,'Color', get(0,'DefaultUicontrolBackgroundColor')); end % Generate HANDLES structure and store with GUIDATA guidata(gui_hFigure, guihandles(gui_hFigure)); end % If user specified 'Visible','off' in p/v pairs, don't make the figure % visible. gui_MakeVisible = 1; for ind=1:2:length(varargin) if length(varargin) == ind break; end len1 = min(length('visible'),length(varargin{ind})); len2 = min(length('off'),length(varargin{ind+1})); if ischar(varargin{ind}) && ischar(varargin{ind+1}) && ... strncmpi(varargin{ind},'visible',len1) && len2 > 1 if strncmpi(varargin{ind+1},'off',len2) gui_MakeVisible = 0; elseif strncmpi(varargin{ind+1},'on',len2) gui_MakeVisible = 1; end end end % Check for figure param value pairs for index=1:2:length(varargin) if length(varargin) == index || ~ischar(varargin{index}) break; end try set(gui_hFigure, varargin{index}, varargin{index+1}), catch break, end end % If handle visibility is set to 'callback', turn it on until finished % with OpeningFcn gui_HandleVisibility = get(gui_hFigure,'HandleVisibility'); if strcmp(gui_HandleVisibility, 'callback') set(gui_hFigure,'HandleVisibility', 'on'); end feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:}); if ishandle(gui_hFigure) % Update handle visibility set(gui_hFigure,'HandleVisibility', gui_HandleVisibility); % Make figure visible if gui_MakeVisible set(gui_hFigure, 'Visible', 'on') if gui_Options.singleton setappdata(gui_hFigure,'GUIOnScreen', 1); end end % Done with GUI initialization rmappdata(gui_hFigure,'InGUIInitialization'); end % If handle visibility is set to 'callback', turn it on until finished with % OutputFcn if ishandle(gui_hFigure) gui_HandleVisibility = get(gui_hFigure,'HandleVisibility'); if strcmp(gui_HandleVisibility, 'callback') set(gui_hFigure,'HandleVisibility', 'on'); end gui_Handles = guidata(gui_hFigure); else gui_Handles = []; end if nargout [varargout{1:nargout}] = feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles); else feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles); end if ishandle(gui_hFigure) set(gui_hFigure,'HandleVisibility', gui_HandleVisibility); endend function gui_hFigure = local_openfig(name, singleton)% openfig with three arguments was new from R13. Try to call that first, if% failed, try the old openfig.try gui_hFigure = openfig(name, singleton, 'auto');catch % OPENFIG did not accept 3rd input argument until R13, % toggle default figure visible to prevent the figure % from showing up too soon. gui_OldDefaultVisible = get(0,'defaultFigureVisible'); set(0,'defaultFigureVisible','off'); gui_hFigure = openfig(name, singleton); set(0,'defaultFigureVisible',gui_OldDefaultVisible);end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -