issue with read_ctf_res4.m: use of uinit8 and char in fread
r.oostenveld at FCDONDERS.RU.NL
Thu Jul 24 09:29:52 CEST 2008
Thanks for the suggested change. I have incoroprated it and it will
be included in tonights release version on the ftp.
The char/int8 problem had been reported before, but I have never seen
it happen myself on any of the computers that I have been working
with. Do you think that it might be related to particular language
settings on the computer that you are using? Since it not always
occuring to me seems to indicate that Matlab sometimes wants to use 8
bit and sometimes 16 bit wide characters.
Actually there is a lot of reading code for other (non ctf) formats
that also uses fread(...'char'). That code should also be affected
with the bug, which means that I should make the suggested change
everywhere where chars are read.
On 21 Jul 2008, at 20:06, Erick Britis Ortiz wrote:
> I think that this problem is due to a change in fread's behaviour:
> as nowadays characters are not always 8-bit wide, we are supposed
> to use 'uint8' instead of 'char'. This change has been responsible
> for some nasty problems, including this one.
> As of 20080720 version of Fieldtrip, the snapshot still showed this
> behavior. Herewith I am attaching a correction of read_ctf_res4.m.
> Hope that some of you who have had similar problem might find it
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.
More information about the fieldtrip