<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><br>
Sent by Blackberry</font><br>
<br>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<font style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><b>Von</b>: "Jörn M. Horschig" [mailto:jm.horschig@donders.ru.nl]
<br>
<b>Gesendet</b>: Monday, June 11, 2012 09:20 AM<br>
<b>An</b>: FieldTrip discussion list <fieldtrip@science.ru.nl> <br>
<b>Betreff</b>: Re: [FieldTrip] How to use FieldTrip on mat files for Biomag2012?
<br>
</font> <br>
</div>
Dear Vlad,<br>
<br>
FieldTrip data reading functions do not work with .mat files, but with raw data file formats that are the result from direct data recording. If data is already available in a .mat file, you can just load it in MATLAB workspace using
<br>
<i><small>>> load ltmcla_S08.mat</small></i><br>
<br>
This should result in some variable, most likely <i><small>data</small></i> <small>
<big>in your workspace</big>.</small> You can then call ft_preprocessing like this:<br>
<small><i>>> ft_preprocessing(cfg, data)<br>
<br>
</i><big>I am not quite sure about what data you will obtain, maybe it is already preprocessed. Be sure to check this by looking at
<i><small>data.cfg<br>
<br>
</small></i><small><big>Good luck with your project, I hope you have fun and success using FieldTrip ;)<br>
Best,<br>
Jörn<br>
</big></small><i><small></small></i></big></small><br>
On 6/11/2012 3:40 AM, Vlad Chiriacescu wrote:
<blockquote cite="mid:1339378842.8467.YahooMailNeo@web161202.mail.bf1.yahoo.com" type="cite">
<div style="color:#000; background-color:#fff; font-family:times
new roman, new york, times, serif;font-size:12pt">
<div> Hello,</div>
<div><br>
</div>
<div> I am working on a school project related to the Biomag 2012 analysis competition.</div>
<div><br>
</div>
<div> I have downloaded a .zip file from <a class="moz-txt-link-freetext" href="ftp://ftp.fcdonders.nl/pub/biomag2012/">
ftp://ftp.fcdonders.nl/pub/biomag2012/</a>.</div>
<div><br>
</div>
<div> I have extracted the content and I am interested in the second objective,</div>
<div>the one related to long-term memory representations (folder data2).</div>
<div><br>
</div>
<div> I was able to load the 2 mat files into Matlab workspace.</div>
<div><br>
</div>
<div> I was also able to use FieldTrip functions on tutorial code.</div>
<div><br>
</div>
<div> However, when I try to use ft_preprocessing on one of the mat files I get an error.</div>
<div><br>
</div>
<div> Here is the code I wrote:</div>
<div><br>
</div>
<div> cfg1.dataset = 'ltmcla_S08.mat'</div>
<div> data_org = ft_preprocessing(cfg1)</div>
<div><br>
</div>
<div> And the error is:</div>
<div> ??? Error using ==> ft_read_header at 1639<br>
unsupported header format (matlab)<br>
<br>
Error in ==> ft_preprocessing at 344<br>
hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);</div>
<div><br>
</div>
<div> I saw a tutorial using ft_read_header, ft_read_data and ft_write_data <br>
</div>
<div>on a .dat file that was converting it to a mat/bin pair.</div>
<div><br>
</div>
<div> However, I do not have a .dat file, I have a .mat file.</div>
<div><br>
</div>
<div> Just in case is necessary, I write some details of the .mat file:</div>
<div>Is a 1*1 matlab structure with the following fields:</div>
<div>data, channel, design, time, fs, dim.<br>
</div>
<div><br>
</div>
<div> How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest?</div>
<div><br>
</div>
<div> Thanks a lot,</div>
<div><br>
</div>
<div> Vlad<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands
Contact:
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel: +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
</body>
</html>