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


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.
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_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.
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



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

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