Today when i came acrocss the ft Tutorial , there are two functions maybe confused me,

ft_definetrial

defines the segments of data that will be used for
  further processing and analysis, i.e. the pieces of data that will
  be read in by FT_PREPROCESSING. Trials are defined by their begin
  and end sample in the data file and each trial has an offset that
  defines where the relative t=0 point (usually the sample at which
  the trigger is detected) is for that trial.
  意思就是说这里定义的数据模块是给ft_preprocessing用的,这个函数定义了Trials的起始时间和offset
  之后用ft_preprocessing在对数据进行segment,相当于ft_preprocessing配置文件.其中配置参数如
cfg.trialdef=''; cfg.trialfun='ft_tiralfun_general';cfg.dataset='';

cfg.trialdef   = structure with details of trial definition, see below
 cfg.trialfun   = string with function name, see below (default = 'ft_trialfun_general')
  and also
 cfg.dataset    = pathname to dataset from which to read the events
 
ft_redenfinetrial

FT_REDEFINETRIAL allows you to adjust the time axis of your data, i.e. to
  change from stimulus-locked to response-locked. Furthermore, it allows
  you to select a time window of interest, or to resegment your long trials
  into shorter fragments.
  ft_redefinetrial主要调节数据的时间轴,他处理的数据是从ft_preprocessing处理后的,
Use as
    data = ft_redefinetrial(cfg, data)
  where the input data should correspond to the output of FT_PREPROCESSING and
  the configuration should be specified as explained below.
 cfg.length    = single number (in unit of time, typically seconds) of the required snippets
segement的长度,

这三个函数的关系如同 



ft_definetrial--->ft_preprocessing-->ft_redefinetrial. 

如果你在ft_definetrial已经配置好所有的  只需调用ft_preprocessing即可完成你要的


有时候 可能ft_definetrial没有完全配置好,但是已经 ft_preprocessing 这个时候你就要用ft_redefinetrial