<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">Dear Ioanna,<div><br></div><div>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.</div><div><br></div><div>Best,</div><div><br></div><div>Vladimir</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 29, 2019 at 8:43 PM Ioanna Zioga <<a href="mailto:i.zioga@qmul.ac.uk">i.zioga@qmul.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div id="gmail-m_6560408393654248257divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p style="margin-top:0px;margin-bottom:0px">Hi all!</p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">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.</p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">First, I use the function <i>spm_eeg_ft2spm
</i>to convert the EEG data from fieldtrip to spm data format. The data is saved as '*.mat' and it is:</p>
<p style="margin-top:0px;margin-bottom:0px"></p>
<div>"SPM M/EEG data object</div>
<div>Type: single</div>
<div>Transform: time</div>
<div>1 conditions</div>
<div>53 channels</div>
<div>2000 samples/trial</div>
<div>224 trials</div>
<div>Sampling frequency: 500 Hz</div>
<div>Loaded from file *.mat</div>
<div><br>
</div>
<div>Use the syntax D(channels, samples, trials) to access the data</div>
<div>Type "methods('meeg')" for the list of methods performing other operations with the object</div>
<div>Type "help meeg/method_name" to get help about methods"</div>
<br>
<p></p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">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:</p>
<p style="margin-top:0px;margin-bottom:0px"></p>
<div>Error using spm_eeg_load (line 53)</div>
<div>File "*.mat" doesn't contain SPM M/EEG data.</div>
<div><br>
</div>
<div>Error in spm_eeg_inv_imag_api>Load_Callback (line 124)</div>
<div>D = spm_eeg_load(S);</div>
<div><br>
</div>
<div>Error in spm_eeg_inv_imag_api (line 53)</div>
<div> feval(varargin{:}); % FEVAL switchyard</div>
<div> </div>
<div>Error while evaluating UIControl Callback</div>
<br>
<p></p>
<p style="margin-top:0px;margin-bottom:0px">I'm using SPM12 and MATLAB R2014b.</p>
<p style="margin-top:0px;margin-bottom:0px">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.</p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">Does anyone have any idea why do I get this error, and how can I load a fieldtrip (or even EEGLAB) dataset in SPM?</p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">Thanks so much in advance,</p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">Best wishes,</p>
<p style="margin-top:0px;margin-bottom:0px">Ioanna</p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>