Hi Duncan!
I think the recommended way to do this is to use spm_eeg_ft2spm - i.e. split your 4-D matrix into separate subjects, then create a simple fieldtrip structure which contains the 3-D data for each subject and use this to convert to SPM - you can then add in information about fiducials etc. afterwards. See section 13.2 of the SPM manual, and then 13.4 after that :)
Hope this helps,
Laurence
===========================================
Laurence Hunt, DPhil Student
Centre for Functional MRI of the Brain (FMRIB),
University of Oxford
[log in to unmask]
Phone: (+44)1865-(2)22738
===========================================
On 21 Dec 2009, at 21:56, Christophe Phillips wrote:
> Dear Duncan,
>
> No easy solution... as far as I know.
>
> SPM8 format uses 2 files to represent data:
> - a header file, saved as a mat file, contains the information such as the channel details, sampling rate, event timing, etc.
> - a data file, saved in binary format, contains the data themselves.
> The header file is what SPM defines as an MEEG object, then the data are accessed on disk via a set of functions specific to the object ("file_array").
>
> You would thus need to, for each subject
> - save his data in binary format in a dat file
> - build the corresponding MEEG object with all the informations about those data
>
> Shouldn't be too much work for some one SPM literate...
> Starting with an example data set and looking at how things are done in a function like spm_eeg_epoch would be a good starting point.
>
> HTH,
> Chris
>
> Duncan Astle a écrit :
>> Dear all,
>>
>> I hope everyone is ready for Christmas........
>>
>> So..... I have a bunch of old EEG data that I would really like to take a look at in SPM8. The data was originally collected on an EGI system, but I have everything I need in a 4D matlab matrix, organised as follows: [channels x samples x conditions x subjects]; I can't remember the exact order but I will check. Is there any easy way of convincing SPM that it is in fact an SPM M/EEG object?
>>
>> I will keep trying but if anyone who is better with MATLAB (i.e. anyone) has an easy solution I would be very grateful.
>>
>> Many thanks,
>> Duncan
>>
>>
>>
>
|