eeglab.m
来自「含有多种ICA算法的eeglab工具箱」· M 代码 · 共 1,635 行 · 第 1/5 页
M
1,635 行
end;% menu definition% --------------- eeg_mainfig(onearg);W_MAIN = findobj('tag', 'EEGLAB');EEGUSERDAT = get(W_MAIN, 'userdata');set(W_MAIN, 'MenuBar', 'none');first_m = uimenu( W_MAIN, 'Label', 'File'); neuromenu = uimenu( first_m, 'Label', 'Import data', 'tag', 'import data'); uimenu( neuromenu, 'Label', 'From ASCII/float file or Matlab array' , 'CallBack', [ nocheck '[EEGTMP LASTCOM] = pop_importdata;' e_newnonempty ]); uimenu( neuromenu, 'Label', 'From Biosemi .BDF file','CallBack', [ nocheck '[EEGTMP LASTCOM]= pop_readbdf;' e_newnonempty ], 'Separator', 'on'); uimenu( neuromenu, 'Label', 'From European Data Format .EDF file','CallBack', [ nocheck '[EEGTMP LASTCOM]= pop_readedf;' e_newnonempty ]); uimenu( neuromenu, 'Label', 'From EGI .RAW file' , 'CallBack', [ nocheck '[EEGTMP LASTCOM]= pop_readegi;' e_newnonempty ], 'Separator', 'on'); uimenu( neuromenu, 'Label', 'From Segmented EGI .RAW files', 'CallBack', [ nocheck '[EEGTMP LASTCOM]= pop_readsegegi;' e_newnonempty ]); uimenu( neuromenu, 'Label', 'From BCI2000 ASCII file' , 'CallBack', [ nocheck '[EEGTMP LASTCOM]= pop_loadbci;' e_newnonempty ], 'Separator', 'on'); uimenu( neuromenu, 'Label', 'From Snapmaster .SMA file' , 'CallBack', [ nocheck '[EEGTMP LASTCOM]= pop_snapread;' e_newnonempty ], 'Separator', 'on'); uimenu( neuromenu, 'Label', 'From Neuroscan .CNT file' , 'CallBack', [ nocheck '[EEGTMP LASTCOM]= pop_loadcnt;' e_newnonempty ], 'Separator', 'on'); uimenu( neuromenu, 'Label', 'From Neuroscan .EEG file' , 'CallBack', [ nocheck '[EEGTMP LASTCOM]= pop_loadeeg;' e_newnonempty ]); uimenu( neuromenu, 'Label', 'From ERPSS .RAW or .RDF file', 'CallBack', [ nocheck '[EEGTMP LASTCOM]= pop_read_erpss;' e_newnonempty ], 'Separator', 'on'); uimenu( neuromenu, 'Label', 'From Brain Vis. Anal. Matlab file', 'CallBack', [ nocheck '[EEGTMP LASTCOM]= pop_loadbva;' e_newnonempty ], 'Separator', 'on'); importepoch = uimenu( first_m, 'Label', 'Import epoch info', 'tag', 'import epoch'); uimenu( importepoch, 'Label', 'From Matlab array or ASCII file', 'CallBack', [ checkepoch '[EEG LASTCOM] = pop_importepoch(EEG);' e_store ]); uimenu( importepoch, 'Label', 'From Neuroscan .DAT file', 'CallBack', [ checkepoch '[EEG LASTCOM]= pop_loaddat(EEG);' e_store]); importevent = uimenu( first_m, 'Label', 'Import event info', 'tag', 'import event'); uimenu( importevent, 'Label', 'From Matlab array or ASCII file', 'CallBack', [ check '[EEG LASTCOM] = pop_importevent(EEG);' e_store]); uimenu( importevent, 'Label', 'From data channel' , 'CallBack', [ check '[EEG LASTCOM]= pop_chanevent(EEG);' e_store]); uimenu( importevent, 'Label', 'From Presentation .LOG file' , 'CallBack', [ check '[EEG LASTCOM]= pop_importpres(EEG);' e_store]); exportm = uimenu( first_m, 'Label', 'Export', 'tag', 'export'); uimenu( exportm, 'Label', 'Data and ICA activity to text file', 'CallBack', [ check 'LASTCOM = pop_export(EEG);' e_histdone ]); uimenu( exportm, 'Label', 'Weight matrix to text file' , 'CallBack', [ check 'LASTCOM = pop_expica(EEG, ''weights'');' e_histdone ]); uimenu( exportm, 'Label', 'Inverse weight matrix to text file', 'CallBack', [ check 'LASTCOM = pop_expica(EEG, ''inv'');' e_histdone ]); uimenu( first_m, 'Label', 'Load existing dataset' , 'Separator', 'on' , 'CallBack', [ nocheck '[EEGTMP LASTCOM] = pop_loadset;' e_load_nh]); uimenu( first_m, 'Label', 'Save current dataset' , 'Separator', 'on', 'CallBack', [ check '[EEG LASTCOM] = pop_saveset(EEG);' e_store]); uimenu( first_m, 'Label', 'Save datasets' , 'CallBack', [ check '[ALLEEG LASTCOM] = pop_saveset(ALLEEG);' e_hist_nh ]); uimenu( first_m, 'Label', 'Clear dataset(s)' , 'CallBack', [ nocheck '[ALLEEG LASTCOM] = pop_delset(ALLEEG, -CURRENTSET);' e_hist_nh 'eeglab redraw;' ]); uimenu( first_m, 'Label', 'Maximize memory' , 'Separator', 'on' , 'CallBack', [ nocheck 'LASTCOM = pop_editoptions;' e_storeall_nh]); hist_m = uimenu( first_m, 'Label', 'Save history' , 'Separator', 'on'); uimenu( hist_m, 'Label', 'Dataset history', 'CallBack', [ nocheck 'LASTCOM = pop_saveh(EEG.history);' e_hist_nh]); uimenu( hist_m, 'Label', 'Session history', 'CallBack', [ nocheck 'LASTCOM = pop_saveh(ALLCOM);' e_hist_nh]); uimenu( first_m, 'Label', 'Quit' , 'Separator', 'on' , 'CallBack', ... [ 'close(gcf); disp(''To save the EEGLAB command history >> pop_saveh(ALLCOM);''); clear global EEG ALLEEG LASTCOM CURRENTSET;']);second_m = uimenu( W_MAIN, 'Label', 'Edit'); uimenu( second_m, 'Label', 'Dataset info' , 'CallBack', [ check '[EEG LASTCOM] = pop_editset(EEG);' e_store]); uimenu( second_m, 'Label', 'Event fields' , 'CallBack', [ checkevent '[EEG LASTCOM] = pop_editeventfield(EEG);' e_store]); uimenu( second_m, 'Label', 'Event values' , 'CallBack', [ checkevent '[EEG LASTCOM] = pop_editeventvals(EEG);' e_store]); uimenu( second_m, 'Label', 'About this dataset', 'CallBack',[ check '[EEG.comments LASTCOM] =pop_comments(EEG.comments, ''About this dataset'');' e_store]); uimenu( second_m, 'Label', 'Channel locations' , 'CallBack', [ ... 'disp(''IMPORTANT: After importing/modifying data channels, you must close'');' ... 'disp(''the channel editing window for the changes to take effect in EEGLAB.'');' ... 'disp(''TIP: call this function directy from the prompt, ">> pop_chanedit([]);"'');' ... 'disp('' to convert between channel location file formats'');' ... '[TMPCHAN LASTCOM] =pop_chanedit(EEG.chanlocs); if ~isempty(LASTCOM), EEG.chanlocs = TMPCHAN; eeg_checkset(EEG, ''chanlocsize'');' ... 'clear TMPCHAN; EEG = h(LASTCOM, EEG);' storecall 'end; eeglab(''redraw'');']); uimenu( second_m, 'Label', 'Select data' , 'CallBack', [ check '[EEG LASTCOM] = pop_select(EEG);' e_newset], 'Separator', 'on'); uimenu( second_m, 'Label', 'Select epochs/events' , 'CallBack', [ checkevent '[EEG TMP LASTCOM] = pop_selectevent(EEG); clear TMP;' e_newset ]); uimenu( second_m, 'Label', 'Copy current dataset' , 'CallBack', [ check '[ALLEEG LASTCOM] = pop_copyset(ALLEEG, CURRENTSET); eeglab(''redraw'');' e_hist_nh], 'Separator', 'on'); uimenu( second_m, 'Label', 'Append datasets', 'CallBack', [ check '[EEGTMP LASTCOM] = pop_mergeset(ALLEEG);' e_newnonempty_nh]); uimenu( second_m, 'Label', 'Delete dataset(s)' , 'CallBack', [ nocheck '[ALLEEG LASTCOM] = pop_delset(ALLEEG, -CURRENTSET);' e_hist_nh 'eeglab redraw;' ]); fourth_m = uimenu( W_MAIN, 'Label', 'Tools', 'tag', 'tools'); uimenu( fourth_m, 'Label', 'Change sampling rate', 'CallBack', [ check '[EEG LASTCOM] = pop_resample(EEG);' e_newset]); uimenu( fourth_m, 'Label', 'Filter the data' , 'CallBack', [ check '[EEG LASTCOM] = pop_eegfilt(EEG);' e_newset]); uimenu( fourth_m, 'Label', 'Re-reference' , 'CallBack', [ check '[EEG LASTCOM] = pop_reref(EEG);' e_newset]); uimenu( fourth_m, 'Label', 'Reject continuous data','CallBack',[ checkcont '[LASTCOM] = pop_eegplot(EEG, 1);' e_hist]); uimenu( fourth_m, 'Label', 'Extract epochs' , 'CallBack', [ check '[EEG tmp LASTCOM] = pop_epoch(EEG); clear tmp;' e_newset check '[EEG LASTCOM] = pop_rmbase(EEG);' e_store], 'Separator', 'on'); uimenu( fourth_m, 'Label', 'Remove baseline' , 'CallBack', [ check '[EEG LASTCOM] = pop_rmbase(EEG);' e_store]); fourth_sub1 = uimenu( fourth_m, 'Label', 'Reject data epochs'); uimenu( fourth_m, 'Label', 'Run ICA' , 'CallBack', [ check '[EEG LASTCOM] = pop_runica(EEG);' e_store], 'foregroundcolor', 'b', 'Separator', 'on'); uimenu( fourth_m, 'Label', 'Remove components' , 'CallBack', [ checkica '[EEG LASTCOM] = pop_subcomp(EEG);' e_newset]); fourth_sub2 = uimenu( fourth_m, 'Label', 'Reject data using ICA'); uimenu( fourth_sub1, 'Label', 'Reject data (all methods)', 'CallBack', [ check 'pop_rejmenu(EEG, 1); LASTCOM = '''';' e_hist]); uimenu( fourth_sub1, 'Label', 'Reject by inspection' , 'CallBack', [ check '[LASTCOM] = pop_eegplot(EEG, 1);' e_hist]); uimenu( fourth_sub1, 'Label', 'Reject extreme values' , 'CallBack', [ checkepoch '[TMP LASTCOM] = pop_eegthresh(EEG, 1); clear TMP;' e_hist]); uimenu( fourth_sub1, 'Label', 'Reject flat line data' , 'CallBack', [ checkepoch '[EEG LASTCOM] = pop_rejtrend(EEG, 1);' e_store]); uimenu( fourth_sub1, 'Label', 'Reject by probability' , 'CallBack', [ checkepoch '[EEG LASTCOM] = pop_jointprob(EEG, 1);' e_store]); uimenu( fourth_sub1, 'Label', 'Reject by kurtosis' , 'CallBack', [ checkepoch '[EEG LASTCOM] = pop_rejkurt(EEG, 1);' e_store]); uimenu( fourth_sub1, 'Label', 'Reject by spectra' , 'CallBack', [ checkepoch '[EEG Itmp LASTCOM] = pop_rejspec(EEG, 1); clear Itmp;' e_store]); uimenu( fourth_sub1, 'Label', 'Export marks to ICA reject', 'separator', 'on', 'CallBack', [ checkepochica ... '[EEG LASTCOM] = eeg_rejsuperpose(EEG, 1,1,1,1,1,1,1,1); h(LASTCOM);' ... 'LASTCOM = ''EEG.reject.icarejmanual = EEG.reject.rejglobal;''; eval(LASTCOM);' e_store ]); uimenu( fourth_sub1, 'Label', 'Reject marked epochs', 'separator', 'on', 'foregroundcolor', 'b', 'CallBack', [ checkepoch ... '[EEG LASTCOM] = eeg_rejsuperpose(EEG, 1,1,1,1,1,1,1,1); h(LASTCOM);' ... '[EEG LASTCOM] = pop_rejepoch(EEG, EEG.reject.rejglobal,1);' e_newset]); uimenu( fourth_sub2, 'Label', 'Reject components by map', 'CallBack', [ checkicaplot '[EEG LASTCOM] = pop_selectcomps(EEG);' e_store]); uimenu( fourth_sub2, 'Label', 'Reject data (all methods)','CallBack', [ checkepochica 'pop_rejmenu(EEG, 0); LASTCOM ='''';' e_hist], 'Separator', 'on'); uimenu( fourth_sub2, 'Label', 'Reject by inspection', 'CallBack', [ checkica '[LASTCOM] = pop_eegplot(EEG, 0);' e_hist]); uimenu( fourth_sub2, 'Label', 'Reject extreme values', 'CallBack', [ checkepochica '[TMP LASTCOM] = pop_eegthresh(EEG, 0); clear TMP;' e_hist]); uimenu( fourth_sub2, 'Label', 'Reject flat line activity','CallBack', [ checkepochica '[EEG LASTCOM] = pop_rejtrend(EEG, 0);' e_store]); uimenu( fourth_sub2, 'Label', 'Reject by probability', 'CallBack', [ checkepochica '[EEG LASTCOM] = pop_jointprob(EEG, 0);' e_store]); uimenu( fourth_sub2, 'Label', 'Reject by kurtosis', 'CallBack', [ checkepochica '[EEG LASTCOM] = pop_rejkurt(EEG, 0);' e_store]); uimenu( fourth_sub2, 'Label', 'Reject by spectra', 'CallBack', [ checkepochica '[EEG LASTCOM] = pop_rejspec(EEG, 0);' e_store]); uimenu( fourth_sub2, 'Label', 'Export marks to data reject', 'separator', 'on', 'CallBack', [ checkepochica ... '[EEG LASTCOM] = eeg_rejsuperpose(EEG, 0,1,1,1,1,1,1,1); h(LASTCOM);' ... 'LASTCOM = ''EEG.reject.rejmanual = EEG.reject.rejglobal;''; eval(LASTCOM);' e_store ]); uimenu( fourth_sub2, 'Label', 'Reject marked epochs', 'separator', 'on', 'foregroundcolor', 'b', 'CallBack', [ checkepochica ... '[EEG LASTCOM] = eeg_rejsuperpose(EEG, 0,1,1,1,1,1,1,1); h(LASTCOM);' ... '[EEG LASTCOM] = pop_rejepoch(EEG, EEG.reject.rejglobal,1);' e_newset ]); third_m = uimenu( W_MAIN, 'Label', 'Plot', 'tag', 'plot'); loc_m = uimenu( third_m, 'Label', 'Channel locations' ); uimenu( loc_m, 'Label', 'By name' , 'CallBack' , [ checkplot 'LASTCOM = [''figure; topoplot([],EEG.chanlocs, ''''style'''', ''''blank'''', ''''electrodes'''', ''''labelpoint'''');'']; eval(LASTCOM);' e_hist]); uimenu( loc_m, 'Label', 'By number' , 'CallBack', [ checkplot 'LASTCOM = [''figure; topoplot([],EEG.chanlocs, ''''style'''', ''''blank'''', ''''electrodes'''', ''''numpoint'''');'']; eval(LASTCOM);' e_hist]); uimenu( third_m, 'Label', 'Channel data (scroll)' , 'CallBack', [ check 'LASTCOM = pop_eegplot(EEG, 1, 1, 1);' e_hist], 'Separator', 'on'); uimenu( third_m, 'Label', 'Channel spectra and maps' , 'CallBack', [ check 'LASTCOM = pop_spectopo(EEG, 1);' e_hist]); uimenu( third_m, 'Label', 'Channel properties' , 'CallBack', [ checkplot 'LASTCOM = pop_prop(EEG,1);' e_hist]); uimenu( third_m, 'Label', 'Channel ERP image' , 'CallBack', [ checkepoch 'LASTCOM = pop_erpimage(EEG, 1, h(''find'',''pop_erpimage(EEG,1''));' e_hist]); ERP_m = uimenu( third_m, 'Label', 'Channel ERPs'); uimenu( ERP_m, 'Label', 'With scalp maps' , 'CallBack', [ checkplot 'LASTCOM = pop_timtopo(EEG);' e_hist]); uimenu( ERP_m, 'Label', 'In scalp array' , 'CallBack', [ checkplot 'LASTCOM = pop_plottopo(EEG);' e_hist]); uimenu( ERP_m, 'Label', 'In rect. array' , 'CallBack', [ checkepoch '[tmpeeg LASTCOM] = pop_plotdata(EEG, 1); clear tmpeeg;' e_hist]); topo_m = uimenu( third_m, 'Label', 'ERP map series'); uimenu( topo_m, 'Label', 'In 2-D' , 'CallBack', [ checkplot 'LASTCOM = pop_topoplot(EEG, 1);' e_hist]); uimenu( topo_m, 'Label', 'In 3-D' , 'CallBack', [ checkplot '[EEG LASTCOM] = pop_headplot(EEG, 1);' e_store]); uimenu( third_m, 'Label', 'Sum/Compare ERPs' , 'CallBack', [ checkepoch 'LASTCOM = pop_comperp(ALLEEG);' e_hist]); uimenu( third_m, 'Label', 'Component activations (scroll)', 'CallBack', [ checkica '[LASTCOM] = pop_eegplot(EEG, 0, 1, 1);' e_hist],'Separator', 'on'); uimenu( third_m, 'Label', 'Component spectra and maps' , 'CallBack', [ checkicaplot 'LASTCOM = pop_spectopo(EEG, 0);' e_hist]); topoica_m = uimenu( third_m, 'Label', 'Component maps'); uimenu( topoica_m, 'Label', 'In 2-D', 'CallBack', [ checkicaplot 'LASTCOM = pop_topoplot(EEG, 0);' e_hist]); uimenu( topoica_m, 'Label', 'In 3-D', 'CallBack', [ checkicaplot '[EEG LASTCOM] = pop_headplot(EEG, 0);' e_store]); uimenu( third_m, 'Label', 'Component properties' , 'CallBack', [ checkicaplot 'LASTCOM = pop_prop(EEG,0);' e_hist]); uimenu( third_m, 'Label', 'Component ERP image' , 'CallBack', [ checkepochica 'LASTCOM = pop_erpimage(EEG, 0, h(''find'',''pop_erpimage(EEG,0''));' e_hist]); ERPC_m = uimenu( third_m, 'Label', 'Component ERPs'); uimenu( ERPC_m, 'Label', 'With component maps', 'CallBack', [ checkica 'LASTCOM = pop_envtopo(EEG);' e_hist]); uimenu( ERPC_m, 'Label', 'With comp. maps (compare)', 'CallBack', [ checkica 'if length(ALLEEG) == 1, error(''Need at least 2 datasets''); end; LASTCOM = pop_envtopo(ALLEEG);' e_hist]); uimenu( ERPC_m, 'Label', 'In rectangular array' , 'CallBack', [ checkepochica '[tmpeeg LASTCOM] = pop_plotdata(EEG, 0); clear tmpeeg;' e_hist]); uimenu( third_m, 'Label', 'Sum/Compare comp. ERPs' , 'CallBack', [ checkepochica 'LASTCOM = pop_comperp(ALLEEG, 0);' e_hist]); stat_m = uimenu( third_m, 'Label', 'Data statistics', 'Separator', 'on'); %, 'enable', fastif(exist('kstest'), 'on', 'off')); uimenu( stat_m, 'Label', 'Channel statistics' , 'CallBack', [ check 'LASTCOM = pop_signalstat(EEG, 1);' e_hist]); uimenu( stat_m, 'Label', 'Component statistics' , 'CallBack', [ checkica 'LASTCOM = pop_signalstat(EEG, 0);' e_hist]); uimenu( stat_m, 'Label', 'Event statistics' , 'CallBack', [ checkevent 'LASTCOM = pop_eventstat(EEG);' e_hist]); spec_m = uimenu( third_m, 'Label', 'Time-frequency transforms', 'Separator', 'on'); uimenu( spec_m, 'Label', 'Channel time-frequency' , 'CallBack', [ checkepoch 'LASTCOM = pop_timef(EEG, 1, h(''find'',''pop_timef(EEG,1''));' e_hist]); uimenu( spec_m, 'Label', 'Channel cross-coherence' , 'CallBack', [ checkepoch 'LASTCOM = pop_crossf(EEG, 1,h(''find'',''pop_crossf(EEG,1''));' e_hist]); uimenu( spec_m, 'Label', 'Component time-frequency' , 'CallBack', [ checkepochica 'LASTCOM = pop_timef(EEG, 0, h(''find'',''pop_timef(EEG,0''));' e_hist],'Separator', 'on'); uimenu( spec_m, 'Label', 'Component cross-coherence', 'CallBack', [ checkepochica 'LASTCOM = pop_crossf(EEG, 0,h(''find'',''pop_crossf(EEG,0''));' e_hist]); set_m = uimenu( W_MAIN, 'Label', 'Datasets'); help_m = uimenu( W_MAIN, 'Label', 'Help'); uimenu( help_m, 'Label', 'About EEGLAB', 'CallBack', 'pophelp(''eeglab'');'); uimenu( help_m, 'Label', 'About EEGLAB help', 'CallBack', 'pophelp(''eeg_helphelp'');'); uimenu( help_m, 'Label', 'EEGLAB license', 'CallBack', 'pophelp(''license.txt'', 1);'); uimenu( help_m, 'Label', 'EEGLAB menus', 'CallBack', 'eeg_helpmenu;','separator','on'); help_subm1 = uimenu( help_m, 'Label', 'EEGLAB functions'); uimenu( help_subm1, 'Label', 'Toolbox functions', 'CallBack', 'pophelp(''ica'');'); uimenu( help_subm1, 'Label', 'Signal processing functions', 'callback', 'eeg_helpsigproc;'); uimenu( help_subm1, 'Label', 'Interactive pop_ functions', 'callback', 'eeg_helppop;'); help_subm2 = uimenu( help_m, 'Label', 'EEGLAB advanced'); uimenu( help_subm2, 'Label', 'Dataset structure', 'CallBack', 'pophelp(''eeg_checkset'');'); uimenu( help_subm2, 'Label', 'Admin functions', 'callback', 'eeg_helpadmin;'); uimenu( help_m, 'Label', 'Tutorial (web)', 'CallBack', 'tutorial;'); uimenu( help_m, 'Label', 'Contact us (email)', 'CallBack', 'web(''mailto:eeglab@sccn.ucsd.edu'');'); % looking for eeglab plugins % -------------------------- p = which('eeglab.m'); p = p(1:findstr(p,'eeglab.m')-1); dircontent1 = what(p); %dircontent2 = what( [ p 'plugins' ]); %dircontent = { dircontent1.m{:} dircontent2.m{:} }; dircontent = dir([ p 'plugins' ]); delimiter = p(end); if strcmpi(delimiter, ':'), delmiter = '::'; end; dircontent = { dircontent1.m{:} dircontent.name }; for index = 1:length(dircontent) % find function % ------------- funcname = ''; if exist(dircontent{index}) == 7 if ~strcmpi(dircontent{index}, '.') & ~strcmpi(dircontent{index}, '..') addpath([ p 'plugins' delimiter dircontent{index} ]); tmpdir = dir([ p 'plugins' delimiter dircontent{index}]); for tmpind = 1:length(tmpdir) if ~isempty(findstr(tmpdir(tmpind).name, 'eegplugin')) & tmpdir(tmpind).name(end) == 'm' funcname = tmpdir(tmpind).name(1:end-2); tmpind = length(tmpdir); end; end; end; elseif ~isempty(findstr(dircontent{index}, 'eegplugin')) & dircontent{index}(end) == 'm' funcname = dircontent{index}(1:end-2); % remove .m end; % execute function % ---------------- if ~isempty(funcname) vers = ''; % version try, eval( [ 'vers =' funcname '(gcf, trystrs, catchstrs);' ]); disp(['eeglab: adding plugin "' vers '" (see >> help ' funcname ')' ]); catch try, eval( [ funcname '(gcf, trystrs, catchstrs)' ]); disp(['eeglab: adding plugin function "' funcname '"' ]); catch disp([ 'eeglab: error while adding plugin "' funcname '"' ] ); disp([ ' ' lasterr] ); end; end; end; end; % changing plugin menu color % -------------------------- fourthsub_m = findobj('parent', fourth_m); plotsub_m = findobj('parent', third_m); importsub_m = findobj('parent', neuromenu); epochsub_m = findobj('parent', importepoch); eventsub_m = findobj('parent', importevent); exportsub_m = findobj('parent', exportm); icadefs; % containing PLUGINMENUCOLOR if length(fourthsub_m) > 10, set(fourthsub_m(1:end-10), 'foregroundcolor', PLUGINMENUCOLOR); end; if length(plotsub_m) > 17, set(plotsub_m (1:end-17), 'foregroundcolor', PLUGINMENUCOLOR); end; if length(importsub_m) > 11, set(importsub_m(1:end-11), 'foregroundcolor', PLUGINMENUCOLOR); end; if length(epochsub_m ) > 2 , set(epochsub_m (1:end-2 ), 'foregroundcolor', PLUGINMENUCOLOR); end; if length(eventsub_m ) > 3 , set(eventsub_m (1:end-3 ), 'foregroundcolor', PLUGINMENUCOLOR); end; if length(exportsub_m) > 3 , set(exportsub_m(1:end-3 ), 'foregroundcolor', PLUGINMENUCOLOR); end;EEGMENU = uimenu( set_m, 'Label', '------', 'Enable', 'off');set(W_MAIN, 'userdat', { EEGUSERDAT{1} EEGMENU });eeglab('redraw');if nargout < 1 clear ALLEEG;end;% REMOVED MENUS %uimenu( fourth_m, 'Label', 'Automatic comp. reject', 'enable', 'off', 'CallBack', '[EEG LASTCOM] = pop_rejcomp(EEG); h(LASTCOM); if ~isempty(LASTCOM), eeg_store(CURRENTSET); end;'); %uimenu( fourth_m, 'Label', 'Reject (synthesis)' , 'Separator', 'on', 'CallBack', '[EEG LASTCOM] = pop_rejall(EEG); h(LASTCOM); if ~isempty(LASTCOM), eeg_store; end; eeglab(''redraw'');');% --------------------% draw the main figure% --------------------function eeg_mainfig(onearg);icadefs;COLOR = BACKEEGLABCOLOR;WINMINX = 17;WINMAXX = 260;WINYDEC = 13;NBLINES = 16;WINY = WINYDEC*NBLINES;BORDERINT = 4;BORDEREXT = 10;FONTNAME = 'courrier';FONTSIZE = 11;hh = findobj('tag', 'EEGLAB');if ~isempty(hh) disp('EEGLAB warning: there can be only one EEGLAB window, closing old one'); close(hh);end;if strcmpi(onearg, 'remote') figure( 'name', 'EEGLAB v4.4', ... 'numbertitle', 'off', ... 'resize', 'off', ... 'Position',[200 100 (WINMINX+WINMAXX+2*BORDERINT+2*BORDEREXT) 30 ], ... 'color', COLOR, ... 'Tag','EEGLAB', ... 'Userdata', {[] []}); return;end;W_MAIN = figure('Units','points', ...... % 'Colormap','gray', ... 'PaperPosition',[18 180 576 432], ... 'PaperUnits','points', ... 'name', 'EEGLAB v4.4', ... 'numbertitle', 'off', ... 'resize', 'off', ... 'Position',[200 100 (WINMINX+WINMAXX+2*BORDERINT+2*BORDEREXT) (WINY+2*BORDERINT+2*BORDEREXT) ], ... 'color', COLOR, ... 'Tag','EEGLAB', ... 'visible', 'off', ... 'Userdata', {[] []});BackgroundColor = get(gcf, 'color'); %[0.701960784313725 0.701960784313725 0.701960784313725];H_MAIN(1) = uicontrol('Parent',W_MAIN, ... 'Units','points', ... 'BackgroundColor',COLOR, ... 'ListboxTop',0, ... 'HorizontalAlignment', 'left',... 'Position',[BORDEREXT BORDEREXT (WINMINX+WINMAXX+2*BORDERINT) (WINY)], ... 'Style','frame', ... 'Tag','Frame1');geometry = { [1] [1] [1] [1 1] [1 1] [1 1] [1 1] [1 1] [1 1] [1 1] [1 1] [1 1] [1 1] [1 1] [1] };listui = { { 'style', 'text', 'string', 'Parameters of the current set', 'tag', 'win0' } { } ... { 'style', 'text', 'tag', 'win1', 'string', ' ', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'win2', 'string', 'Channels per frame', 'userdata', 'datinfo'} ... { 'style', 'text', 'tag', 'val2', 'string', ' ', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'win3', 'string', 'Frames per epoch', 'userdata', 'datinfo'} ... { 'style', 'text', 'tag', 'val3', 'string', ' ', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'win4', 'string', 'Epochs', 'userdata', 'datinfo'} ... { 'style', 'text', 'tag', 'val4', 'string', ' ', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'win5', 'string', 'Events', 'userdata', 'datinfo'} ... { 'style', 'text', 'tag', 'val5', 'string', ' ', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'win6', 'string', 'Sampling rate (Hz)', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'val6', 'string', ' ', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'win7', 'string', 'Epoch start (sec)', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'val7', 'string', ' ', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'win8', 'string', 'Epoch end (sec)', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'val8', 'string', ' ', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'win9', 'string', 'Average reference', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'val9', 'string', ' ', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'win10', 'string', 'Channel locations', 'userdata', 'datinfo'} ... { 'style', 'text', 'tag', 'val10', 'string', ' ', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'win11', 'string', 'ICA weights', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'val11', 'string', ' ', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'win12', 'string', 'Dataset size (Mb)', 'userdata', 'datinfo' } ... { 'style', 'text', 'tag', 'val12', 'string', ' ', 'userdata', 'datinfo' } {} };supergui(gcf, geometry, [], listui{:});geometry = { [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] };listui = { { } ... { } ... { 'style', 'text', 'tag', 'mainwin1', 'string', ' ', 'userdata', 'fullline' } ... { 'style', 'text', 'tag', 'mainwin2', 'string', ' ', 'userdata', 'fullline' } ... { 'style', 'text', 'tag', 'mainwin3', 'string', ' ', 'userdata',
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?