Note that this reference documentation is identical to the help that is displayed in MATLAB when you type “help ft_statfun_diff”.

  FT_STATFUN_DIFF computes the difference of the mean in two conditions.
  Although it can be used for statistical testing, it is not very
  usefull since it will have rather limited sensitivity.
  The purpose of this function is to show you an example on how to
  write a statfun that expresses the difference in the data between
  two conditions. You can use such a function with the statistical
  framework in FieldTrip to perform a simple (or more complex)
  permutation test, without having to worry about the representation
  of the data.
  See also FT_STATFUN_MEAN for an other example function