Undefined function 'fiff_read_epochs'
Problem: FieldTrip will not read raw fif files. Gives an error like this:
Undefined function 'fiff_read_epochs' for input arguments of type 'char'.
Error in ft_read_header (line 1911)
epochs = fiff_read_epochs(filename);
Error in ft_read_header (line 134)
hdr{i} = ft_read_header(filename{i}, varargin{:});
ft_defaults
.
Solution: Add the MNE functions to your path. Add the following line of code to your scripts at the stage you would call ft_defaults
.
addpath('~/fieldtrip/fieldtrip/external/mne')
/home/your_username/fieldtrip/fieldtrip
; if not, change to wherever you have FieldTrip.