Back to the main page.
Bug 739 - ismember is slow and should be replaced (if possible) by any(strcmp(...))
Status | CLOSED FIXED |
Reported | 2011-06-07 14:36:00 +0200 |
Modified | 2011-07-13 14:47:00 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P1 normal |
Assigned to: | Jörn M. Horschig |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Robert Oostenveld - 2011-06-07 14:36:07 +0200
this applies to manzana> grep ismember *.m ft_freqstatistics.m:rptdim = find(ismember(dimtok, {'rpt' 'subj'})); ft_megrealign.m:pertrial = all(ismember({'nasX';'nasY';'nasZ';'lpaX';'lpaY';'lpaZ';'rpaX';'rpaY';'rpaZ'}, data.label)); ft_multiplotER.m: if sum(ismember(dimtok, 'time')) ft_multiplotER.m:hasrpt = sum(ismember(dimtok, {'rpt' 'subj'})); ft_multiplotER.m: if (isfull && ~any(ismember(varargin{1}.label, cfg.cohrefchannel))) || ... ft_multiplotER.m: (haslabelcmb && ~any(ismember(varargin{1}.labelcmb(:), cfg.cohrefchannel))) ft_multiplotTFR.m:if ~sum(ismember(dimtok, 'time')) ft_multiplotTFR.m:hasrpt = sum(ismember(dimtok, {'rpt' 'subj'})); ft_multiplotTFR.m: if (isfull && ~any(ismember(data.label, cfg.cohrefchannel))) || ... ft_multiplotTFR.m: (haslabelcmb && ~any(ismember(data.labelcmb(:), cfg.cohrefchannel))) ft_neighbourselection.m:if ~ismember(cfg.method, {'distance', 'triangulation'}) ft_singleplotER.m: if sum(ismember(dimtok, 'time')) ft_singleplotER.m:hasrpt = sum(ismember(dimtok, {'rpt' 'subj'})); ft_singleplotER.m: if (isfull && ~any(ismember(varargin{1}.label, cfg.cohrefchannel))) || ... ft_singleplotER.m: (haslabelcmb && ~any(ismember(varargin{1}.labelcmb(:), cfg.cohrefchannel))) ft_singleplotTFR.m:if ~sum(ismember(dimtok, 'time')) ft_singleplotTFR.m:hasrpt = sum(ismember(dimtok, {'rpt' 'subj'})); ft_singleplotTFR.m: if (isfull && ~any(ismember(data.label, cfg.cohrefchannel))) || ... ft_singleplotTFR.m: (haslabelcmb && ~any(ismember(data.labelcmb(:), cfg.cohrefchannel))) ft_sourcestatistics.m: if ismember('cfg.method', {'parametric' 'randomization' 'randcluster'}), ft_spike_isihist.m: spikesInTrials = ismember(spikeTrials, cfg.trials); ft_spike_maketrials.m: sel = ismember(trialNum,validNum); ft_spike_plot_raster.m: isInTrials = ismember(spike.trial{unitIndx},cfg.trials); ft_spike_plot_raster.m: unitIndx = find(ismember(topData.label,spike.label(spikesel))); ft_spike_sub_defaultcfg.m: setDefaults = find(~ismember(defaultFields,fields)); ft_spike_sub_defaultcfg.m: unusedFields = find(~ismember(fields,defaultFields)); ft_topoplotER.m: if sum(ismember(dimtok, 'time')) ft_topoplotER.m:hasrpt = sum(ismember(dimtok, {'rpt' 'subj'})); ft_topoplotER.m: if (isfull && ~any(ismember(data.label, cfg.cohrefchannel))) || ... ft_topoplotER.m: (haslabelcmb && ~any(ismember(data.labelcmb(:), cfg.cohrefchannel))) ft_volumesegment.m:needtpm = sum(ismember(cfg.output, {'tpm' 'brain' 'skullstrip'})) > 0; ft_volumesegment.m:needana = sum(ismember(cfg.output, {'scalp' 'skullstrip'})) > 0 || dotpm; you should also grep the subdirectories