[FieldTrip] ft_read_header didn't work on the matlab opened from terminal
Konstantinos Tsilimparis
konstantinos.tsilimparis at outlook.com
Thu Aug 29 23:41:10 CEST 2024
Dear Yiheng,
The ft_read_header function works fine for me with a .fif datafile in both cases: when I open MATLAB from the desktop icon and from the terminal. I use Windows 10 and MATLAB2022a.
From your error message it appears that fiff_read_epochs is not found in your path. This function is located in fieldtrip/external/mne, which should be added automatically when you run ft_read_header. However, it seems that this isn't happening for you. To fix that you can manually add this path by running the command ft_hastoolbox('mne', 1).
Best,
Konstantinos
From: fieldtrip <fieldtrip-bounces at science.ru.nl> On Behalf Of ??? via fieldtrip
Sent: Thursday, August 29, 2024 12:02 PM
To: fieldtrip at science.ru.nl
Cc: 胡益衡 <yhhu2020 at ion.ac.cn>
Subject: [FieldTrip] ft_read_header didn't work on the matlab opened from terminal
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<https://www.fieldtriptoolbox.org/reference/ft_defaults> function before I run ft_read_header.
Can someone tell me the reason?
Thanks,
Yiheng Hu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240829/19244914/attachment.htm>
More information about the fieldtrip
mailing list