[FieldTrip] ft_read_header didn't work on the matlab opened from terminal

Mikkel C. Vinding mikkelcv at drcmr.dk
Fri Aug 30 09:17:11 CEST 2024


Dear Yiheng Hu

See here: 
https://github.com/natmegsweden/NatMEG_Wiki/wiki/Undefined-function-'fiff_read_epochs'

Best regards
Mikkel

On 2024-08-29 12:02, 胡益衡 via fieldtrip wrote:
> Dear all,
> 
> I suddenly found my ft_read_header function could not work and gave
> errors as bellow if I opened the matlab from terminal.
> 
>  >> hdr = ft_read_header('hyh_raw_trans_ref_tsss.fif');
> Transforming MEG channels according to the device to head transform
> from the data
>     306 MEG channel locations transformed
> Error using ft_read_header
> Undefined function 'fiff_read_epochs' for input arguments of type
> 'char'.
> 
> But ft_read_header works when I open matlab directly clicking the
> desktop MATLAB icon. In both cases, I add fieldtrip folder to the path
> and execute the ft_defaults [1] function before I run ft_read_header.
> 
>  Can someone tell me the reason?
> 
>  Thanks,
> 
>  Yiheng Hu
> 
> Links:
> ------
> [1] https://www.fieldtriptoolbox.org/reference/ft_defaults
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202


More information about the fieldtrip mailing list