Differences

This shows you the differences between two versions of the page.

Link to this comparison view

reference:ft_selectdata [2018/08/23 14:43] (current)
Line 1: Line 1:
 +=====  FT_SELECTDATA =====
 +
 +Note that this reference documentation is identical to the help that is displayed in MATLAB when you type "help ft_selectdata"​.
 +
 +<​html><​pre>​
 +  <a href=/​reference/​ft_selectdata><​font color=green>​FT_SELECTDATA</​font></​a>​ makes a selection in the input data along specific data
 +  dimensions, such as channels, time, frequency, trials, etc. It can also
 +  be used to average the data along each of the specific dimensions.
 + 
 +  Use as
 +   ​[data] = ft_selectdata(cfg,​ data, ...)
 + 
 +  The cfg argument is a configuration structure which can contain
 +    cfg.tolerance ​  = scalar, tolerance value to determine equality of time/​frequency bins (default = 1e-5)
 + 
 +  For data with trials or subjects as repetitions,​ you can specify
 +    cfg.trials ​     = 1xN, trial indices to keep, can be '​all'​. You can use logical indexing, where false(1,N) removes all the trials
 +    cfg.avgoverrpt ​ = string, can be '​yes'​ or '​no'​ (default = '​no'​)
 + 
 +  For data with a channel dimension you can specify
 +    cfg.channel ​    = Nx1 cell-array with selection of channels (default = '​all'​),​ see <a href=/​reference/​ft_channelselection><​font color=green>​FT_CHANNELSELECTION</​font></​a>​
 +    cfg.avgoverchan = string, can be '​yes'​ or '​no'​ (default = '​no'​)
 +    cfg.nanmean ​    = string, can be '​yes'​ or '​no'​ (default = '​no'​)
 + 
 +  For data with channel combinations you can specify
 +    cfg.channelcmb ​    = Nx2 cell-array with selection of channels (default = '​all'​),​ see <a href=/​reference/​ft_channelcombination><​font color=green>​FT_CHANNELCOMBINATION</​font></​a>​
 +    cfg.avgoverchancmb = string, can be '​yes'​ or '​no'​ (default = '​no'​)
 + 
 +  For data with a time dimension you can specify
 +    cfg.latency ​    = scalar or string, can be '​all',​ '​prestim',​ '​poststim',​ or [beg end], specify time range in seconds
 +    cfg.avgovertime = string, can be '​yes'​ or '​no'​ (default = '​no'​)
 +    cfg.nanmean ​    = string, can be '​yes'​ or '​no'​ (default = '​no'​)
 + 
 +  For data with a frequency dimension you can specify
 +    cfg.frequency ​  = scalar or string, can be '​all',​ or [beg end], specify frequency range in Hz
 +    cfg.avgoverfreq = string, can be '​yes'​ or '​no'​ (default = '​no'​)
 +    cfg.nanmean ​    = string, can be '​yes'​ or '​no'​ (default = '​no'​)
 + 
 +  If multiple input arguments are provided, <a href=/​reference/​ft_selectdata><​font color=green>​FT_SELECTDATA</​font></​a>​ will adjust the individual inputs
 +  such that either the intersection across inputs is retained (i.e. only the channel, time,
 +  and frequency points that are shared across all input arguments), or that the union across
 +  inputs is retained (replacing missing data with nans). In either case, the order (e.g. of
 +  the channels) is made consistent across inputs. ​ The behavior can be specified with
 +    cfg.select ​     = string, can be '​intersect'​ or '​union'​ (default = '​intersect'​)
 + 
 +  See also <a href=/​reference/​ft_datatype><​font color=green>​FT_DATATYPE</​font></​a>,​ <a href=/​reference/​ft_channelselection><​font color=green>​FT_CHANNELSELECTION</​font></​a>,​ <a href=/​reference/​ft_channelcombination><​font color=green>​FT_CHANNELCOMBINATION</​font></​a>​
 +</​pre></​html>​