⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mfbox_rel_hierarchicalg.m

📁 toolbox for spm 5 for data, model free analysis
💻 M
字号:
function varargout=mfbox_rel_hierarchicalg(varargin)% MFBOX_REL_HIERARCHICALG M-file for mfbox_rel_hierarchicalg.fig%% See also: GUIDE, GUIDATA, GUIHANDLES%% Copyright by Peter Gruber, Fabian J. Theis and Ingo R. Keck% Signal Processing & Information Theory group% Institute of Biophysics, University of Regensburg, Germany% Homepage: http://research.fabian.theis.name%           http://www-aglang.uni-regensburg.de%% This file is free software, subject to the % GNU GENERAL PUBLIC LICENSE, see gpl.txt%% REFERENCES:% I.R. Keck, F.J. Theis, P. Gruber, E.W. Lang, K. Specht, G. Fink, % A.M. Tome, C.G. Puntonet, Automated clustering of ICA results % for fMRI data analysis, Proc. CIMED 2005, p. 211-216, Lisboa, % Portugal, 2005% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name',mfilename, ...    'gui_Singleton',gui_Singleton, ...    'gui_OpeningFcn',@mfbox_rel_hierarchicalg_OpeningFcn, ...    'gui_OutputFcn',@mfbox_rel_hierarchicalg_OutputFcn, ...    'gui_LayoutFcn',[], ...    'gui_Callback',[]);if (nargin&&(ischar(varargin{1})))    gui_State.gui_Callback = str2func(varargin{1});endif (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 mfbox_rel_hierarchicalg is made visible.function mfbox_rel_hierarchicalg_OpeningFcn(hObject,eventdata,handles,varargin)% varargin{1} contains the mfbss struct% varargin{2} (optional) contains the parameters% varargin{3} (optional) contains runflag (0: param edit only, 1: param+run, 2: run only)handles.output = hObject;handles.mfbss = varargin{1};tmethod = {'none','variance'};if (~isempty(handles.mfbss.design)), tmethod{end+1} = 'design'; endif (~isempty(handles.mfbss.reference)), tmethod{end+1} = 'reference'; endsmethod = {'none','spatial','temporal','temporalspatial', ...    'spatialvar','temporalvar','temporalspatialvar'};cmethod = {'exp','linear'};set(handles.fraction_slider,'Min',0,'Max',1);if (nargin>4), handles.params = varargin{2};else handles.params = [];endif (nargin>5), handles.runflag = varargin{3};else handles.runflag = 1;endset(handles.fraction,'String',sprintf('%1.2f',handles.params.fraction));set(handles.fraction_slider,'Value',handles.params.fraction);t = find(strcmp(smethod,handles.params.sortby));if (isempty(t)), t = 1; endset(handles.sortby,'String',smethod,'Value',t);t = find(strcmp(tmethod,handles.params.threshold_type));if (isempty(t)), t = 1; endset(handles.thresholdtype,'String',tmethod,'Value',t);set(handles.threshold,'String',sprintf('%1.4f',handles.params.threshold));t = find(strcmp(cmethod,handles.params.compnum_type));if (isempty(t)), t = 1; endset(handles.compnumtype,'String',cmethod,'Value',t);set(handles.factor,'String',sprintf('%1.1f',handles.params.factor));switch handles.params.threshold_type    case 'none'        set(handles.threshold,'Enable','off');    otherwise        set(handles.threshold,'Enable','on');endguidata(hObject,handles);uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout=mfbox_rel_hierarchicalg_OutputFcn(hObject,eventdata,handles) % varargout{1} contains the (modified) parametersif (isstruct(handles))    close(handles.figure1);    varargout{1} = handles.params;else    varargout{1} = [];end% --- Executes on button press in run.function run_Callback(hObject,eventdata,handles)handles.params.fraction = get(handles.fraction_slider,'Value');handles.params.factor = str2double(get(handles.factor,'String'));handles.params.threshold = str2double(get(handles.threshold,'String'));t = get(handles.thresholdtype,'String');handles.params.threshold_type = t{get(handles.thresholdtype,'Value')};t = get(handles.sortby,'String');handles.params.sortby = t{get(handles.sortby,'Value')};t = get(handles.compnumtype,'String');handles.params.compnum_type = t{get(handles.compnumtype,'Value')};guidata(hObject,handles);uiresume(handles.figure1);% --- Executes during object creation, after setting all properties.function fraction_slider_CreateFcn(hObject,eventdata,handles)if (isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor')))    set(hObject,'BackgroundColor',[.9 .9 .9]);end% --- Executes on fraction.function fraction_Callback(hObject,eventdata,handles)v = str2double(get(hObject,'String'));v = max(min(v,1),0);set(hObject,'String',sprintf('%1.2f',v));set(handles.fraction_slider,'Value',v);guidata(hObject,handles);% --- Executes on iterations.function fraction_slider_Callback(hObject,eventdata,handles)set(handles.fraction,'String',sprintf('%1.2f',get(hObject,'Value')));guidata(hObject,handles);% --- Executes on selection change in thresholdtype.function thresholdtype_Callback(hObject, eventdata, handles)t = get(handles.thresholdtype,'String');threshold_type = t{get(handles.thresholdtype,'Value')};switch threshold_type    case 'none'        set(handles.threshold,'Enable','off');    otherwise        set(handles.threshold,'Enable','on');endguidata(hObject,handles);% --- Executes during object creation, after setting all properties.function thresholdtype_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction threshold_Callback(hObject, eventdata, handles)v = str2double(get(hObject,'String'));v = max(v,0);set(hObject,'String',sprintf('%1.4f',v));guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function threshold_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');end% --- Executes on selection change in sortby.function sortby_Callback(hObject, eventdata, handles)% --- Executes during object creation, after setting all properties.function sortby_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction factor_Callback(hObject, eventdata, handles)v = str2double(get(hObject,'String'));v = max(min(v,4),1);set(hObject,'String',sprintf('%1.1f',v));guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function factor_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');end% --- Executes on selection change in compnumtype.function compnumtype_Callback(hObject, eventdata, handles)% --- Executes during object creation, after setting all properties.function compnumtype_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -