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

  FT_CFG2KEYVAL converts between a structure and a cell-array with key-value
  pairs which can be used for optional input arguments.
 
  Use as
    optarg = ft_cfg2keyval(cfg)
 
  See also FT_KEYVAL2CFG, FT_GETOPT