[FieldTrip] loading fieldtrip data in SPM

Vladimir Litvak litvak.vladimir at gmail.com
Tue Apr 30 12:15:54 CEST 2019


Dear Ioanna,

It seems that somehow you didn't provide a name for your dataset. It's the
second argument of spm_eeg_ft2spm. Then two files .mat and .dat should be
generated and you should load the new .mat file and not your file with FT
data.

Best,

Vladimir

On Mon, Apr 29, 2019 at 8:43 PM Ioanna Zioga <i.zioga at qmul.ac.uk> wrote:

> Hi all!
>
>
> I'm trying to do source localization analysis on EEG data and I'm facing
> some problems when using SPM to create a template head model, as I'm not
> able to load the data in SPM.
>
>
> First, I use the function *spm_eeg_ft2spm *to convert the EEG data from
> fieldtrip to spm data format. The data is saved as '*.mat' and it is:
>
> "SPM M/EEG data object
> Type: single
> Transform: time
> 1 conditions
> 53 channels
> 2000 samples/trial
> 224 trials
> Sampling frequency: 500 Hz
> Loaded from file  *.mat
>
> Use the syntax D(channels, samples, trials) to access the data
> Type "methods('meeg')" for the list of methods performing other operations
> with the object
> Type "help meeg/method_name" to get help about methods"
>
>
> Then, I open SPM interface (MEEG), and click on 3D source reconstruction
> to load the data. However, the data aren't loaded and I get this error in
> matlab:
>
> Error using spm_eeg_load (line 53)
> File "*.mat" doesn't contain SPM M/EEG data.
>
> Error in spm_eeg_inv_imag_api>Load_Callback (line 124)
> D = spm_eeg_load(S);
>
> Error in spm_eeg_inv_imag_api (line 53)
>         feval(varargin{:}); % FEVAL switchyard
>
> Error while evaluating UIControl Callback
>
> I'm using SPM12 and MATLAB R2014b.
>
> I'm trying to create a head model in SPM which I will be then able to use
> in fieldtrip to conduct the source analysis.
>
>
> Does anyone have any idea why do I get this error, and how can I load a
> fieldtrip (or even EEGLAB) dataset in SPM?
>
>
> Thanks so much in advance,
>
>
> Best wishes,
>
> Ioanna
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190430/37a61451/attachment-0002.html>
-------------- next part --------------
_______________________________________________
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