<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1250">


<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C84AC9.43A88A60">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="time"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="date"/>
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:DontDisplayPageBoundaries/>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-font-family:"Times New Roman";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:navy;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=EN-GB link=blue vlink=blue style='tab-interval:36.0pt'>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi Kenton,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>There is no need to initialize a matrix
with 21 columns if you only have 6 channels. You can only have 6 columns and if
the labels are correct, Fieldtrip will know how to handle it. To do what you
want you might find the following functions useful. 1) data2raw(), raw2data()
(they are in fieldtrip/private subdirectory so to use them you need to change
the name ‘private’ to something else, like ‘private1’
and add it to your path). With these functions you can convert a raw <span
class=SpellE>struct</span> with cell arrays to a <span class=SpellE>timelock</span>-like
<span class=SpellE>struct</span> with a multidimensional array that is much
easier to handle. You can then manipulate it any way you want and convert the
result back to raw if necessary. 2) <span class=SpellE><span class=GramE>appenddata</span></span><span
class=GramE>(</span>)<span style='mso-spacerun:yes'>  </span>That might be
even simpler. You just create a new raw <span class=SpellE>struct</span> with
the additional channels and then append it to your first <span class=SpellE>struct</span>.
<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Don’t be so sure that if your source
is in ACC the best way to go about localizing it would be to put a lot of
electrodes in the front of the head. Since it’s a deep source that would
be hard to localize anyway and probably projects strongly to the whole scalp
you would need good coverage of the whole head and in particular lower half of
the head, which is not usually covered in standard montages, but more people
now realize that it should be. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You might find additional useful tips in <span
class=SpellE>Clin</span> <span class=SpellE>Neurophysiol</span>. 2004 Oct<span
class=GramE>;115</span>(10):2195-222. <span class=GramE>EEG source imaging.</span>
Michel et al.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>When you feel more confident with <span
class=SpellE>Matlab</span>, Fieldtrip and your data perhaps you could
contribute back to the community by implementing a reader for your data format
in the standard conforming to Fieldtrip <span class=SpellE>fileio</span> module
<a
href="http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:development:fileio">http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:development:fileio</a>
. This will be helpful for anyone who wants to read the .<span class=SpellE>acq</span>
format into Fieldtrip and also other packages that also use this module.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Good luck,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><st1:City><st1:place><font size=2 color=navy face=Arial><span
  style='font-size:10.0pt;font-family:Arial;color:navy'>Vladimir</span></font></st1:place></st1:City><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Tahoma><span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>-----Original
Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> kentonhokanson@gmail.com
[mailto:kentonhokanson@gmail.com] <b><span style='font-weight:bold'>On Behalf
Of </span></b>Kenton Hokanson<br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><st1:date
Month="12" Day="28" Year="2007"><font size=2 face=Tahoma><span lang=EN-US
 style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>Friday,
 December 28, 2007</span></font></st1:date><font size=2 face=Tahoma><span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>
</span></font><st1:time Hour="23" Minute="26"><font size=2 face=Tahoma><span
 lang=EN-US style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>11:26
 PM</span></font></st1:time><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'><br>
<b><span style='font-weight:bold'>To:</span></b> Vladimir Litvak<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [FIELDTRIP] Importing
.acq dataformat</span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Hi Vladimir,<br>
<br>
Thanks a lot for all the advice and the other options.  Following them up
has been very informative.  I've spent some time working through the
MATLAB help file and the tutorials, and things are working well through
topoplotER.m.  More importantly, we're going to try to add some
electrodes.  We're interested mainly in one component which we believe
will come from the ACC, so we'll focus on frontal electrodes and see how good
we can get.  I appreciate your candor through all this.  If I could
impose on you with one last question, I'd be grateful for a bit of help - <br>
<br>
The script I've put together to convert our data file into trial matrices looks
like the following, where the trialK structure reads the trial start (.KS) and
end (.KE) samples from an excel file, and they're then used to define the range
of cells which are imported from the data file (data_all) and put into channels
in the trial matrix.  So, for trial 1, I start with T1 (a matrix of zeros,
4001samples x 21channels), then paste the six data channels (starting at the
trialK.KS(1) start-point until the trialK.KE(1) end-point) into their
appropriate columns according to the EEG1020.LAY file, then transpose the
matrix to form the trial matrix and clear the matrix used to create it. 
This process repeats for each trial.  It works fine, but if I were to
change anything (for example, to add more channels), I would have to insert
that line, with its appropriate trial number, in each of the 200 trials. 
I was wondering if there was a way to condense this, perhaps by changing the
trial number  (N wherever it appears in the form (N) or TN) to be defined
by each cell in a vector I defined or by creating some sort of index in a cell
array.  I've thought about it, but I'm stumped again and would appreciate
any streamlining advice. <br>
</span></font><font size=1><span style='font-size:7.5pt'><br>
trialK.KS = xlsread('C:\Documents and Settings\Kenton
Hokanson\Desktop\JESS_ALLTRIALS_XLS.xls', 1, 'E2:E82');<br>
trialK.KE = xlsread('C:\Documents and Settings\Kenton
Hokanson\Desktop\JESS_ALLTRIALS_XLS.xls', 1, 'F2:F82'); <br>
<br>
T1 = [];<br>
T1(1:4001,</span></font><st1:time Hour="1" Minute="21"><font size=1><span
 style='font-size:7.5pt'>1:21</span></font></st1:time><font size=1><span
style='font-size:7.5pt'>) = 0; %Set all channels in EEG1020.LAY to zero<br>
T1(1:4001,5)=data_all(trialK.KS(1):trialK.KE(1),5); %F3<br>
T1(1:4001,6)=data_all(trialK.KS(1):trialK.KE(1),6); %Fz<br>
T1(1:4001,7)=data_all( trialK.KS(1):trialK.KE(1),7); %F4<br>
T1(1:4001,10)=data_all(trialK.KS(1):trialK.KE(1),4); %C3<br>
T1(1:4001,11)=data_all(trialK.KS(1):trialK.KE(1),3); %Cz<br>
T1(1:4001,12)=data_all(trialK.KS(1):trialK.KE(1),8); %C4<br>
TrialT1 = T1'; <br>
clear T1<br>
<br>
T2 = [];<br>
T2(1:4001,</span></font><st1:time Hour="1" Minute="21"><font size=1><span
 style='font-size:7.5pt'>1:21</span></font></st1:time><font size=1><span
style='font-size:7.5pt'>) = 0;<br>
T2(1:4001,5)=data_all(trialK.KS(2):trialK.KE(2),5);<br>
T2(1:4001,6)=data_all(trialK.KS(2):trialK.KE(2),6);<br>
T2(1:4001,7)=data_all(trialK.KS(2):trialK.KE(2),7);<br>
T2(1:4001,10)=data_all(trialK.KS(2):trialK.KE(2),4);<br>
T2(1:4001,11)=data_all(trialK.KS(2):trialK.KE(2),3);<br>
T2(1:4001,12)=data_all(trialK.KS(2):trialK.KE(2),8);<br>
TrialT2 = T2';<br>
clear T2<br>
...<br>
</span></font><br>
Thanks again, Vladimir, and I'll certainly understand if you don't have time to
address this.  All the best,<br>
Kenton<o:p></o:p></p>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>On </span></font><st1:date
Month="12" Day="25" Year="2007">Dec 25, 2007</st1:date> <st1:time Hour="15"
Minute="24">3:24 PM</st1:time>, Vladimir Litvak < <a
href="mailto:v.litvak@ion.ucl.ac.uk">v.litvak@ion.ucl.ac.uk</a>> wrote:<o:p></o:p></p>

<div link=blue vlink=blue>

<div>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>If all you have are 6
channels, you shouldn't waste your time. To get a meaningful localization you
would need at least 18 and even then it'd be quite imprecise. What you should
understand is that Fieldtrip has no GUI so you shouldn't expect any fancy
windows to open or something magical happen with your data. Most functions
require inputs so dragging them to the command line won't do much. </span></font><o:p></o:p></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Your second attempt is
closer to the truth. It'll probably even work if you start with cfg=[]; </span></font><o:p></o:p></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>So the bottom line is if
you don't have more channels, just drop it. Even if you do, perhaps you should
consider alternatives to Fieldtrip that will be simpler for you to use. BESA (<a
href="http://www.besa.de/" target="_blank">www.besa.de</a>) is nice software
that does source localization and has extensive GUI, but it's quite expensive.
You can also look at EEGLAB (Google it). This is a free package which is
simpler to use than Fieldtrip, but it only does source localization in very
specific context that might not be suitable for you. </span></font><o:p></o:p></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>If you are determined to
stick with Fieldtrip, you should master basic Matlab programming and do the
relevant tutorials from Fieldtrip website. I'm afraid there are no shortcuts
here. The simplest way to get started is take one of the tutorial scripts and
adapt it to your needs. But for this you should understand what you are doing. </span></font><o:p></o:p></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>For timelockanalysis see
if the empty cfg works and then look in the header of timelockanalysis.m for
different options you can put in the cfg and go from there. You can look at <a
href="http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:eventrelatedaveraging"
target="_blank">http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:eventrelatedaveraging
</a>starting with '</span></font><span lang=EN style='mso-ansi-language:EN'>Averaging
the time-locked data'. </span><o:p></o:p></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Good luck,</span></font><o:p></o:p></p>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><font
color="#888888"><span style='color:#888888'><o:p></o:p></span></font></p>

<p style='margin-left:36.0pt'><st1:City><st1:place><font size=2 color=navy
  face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>Vladimir</span></font></st1:place></st1:City><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font><font color="#888888"><span style='color:#888888'><o:p></o:p></span></font></p>

<div>

<div>

<p style='margin-left:36.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>-----Original
Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> <a
href="mailto:kentonhokanson@gmail.com" target="_blank">kentonhokanson@gmail.com</a>
[mailto:<a href="mailto:kentonhokanson@gmail.com" target="_blank">kentonhokanson@gmail.com</a>]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Kenton Hokanson<br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><st1:date
Month="12" Day="25" Year="2007"><font size=2 face=Tahoma><span lang=EN-US
 style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>Tuesday,
 December 25, 2007</span></font></st1:date><font size=2 face=Tahoma><span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>
</span></font><st1:time Hour="22" Minute="6"><font size=2 face=Tahoma><span
 lang=EN-US style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>10:06
 PM</span></font></st1:time><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'><br>
<b><span style='font-weight:bold'>To:</span></b> Vladimir Litvak<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [FIELDTRIP] Importing
.acq dataformat</span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>

<p style='mso-margin-top-alt:5.0pt;margin-right:0cm;margin-bottom:12.0pt;
margin-left:72.0pt'><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi, Vladimir,<br>
My ultimate goal would be source localization.  The two trials come from a
data file of about 150 trials, which are all four second windows where the
sample at 2.001 seconds is a stimulus.  When we average the trials, soon
after the stimulus there is a clear and reliable deflection; we would like to
localize the source of the deflection.  The software package we're using
(AcqKnowledge) can filter, average, etc, but has no localization program. <br>
<br>
So, having set up the data structure, I would think my next step should be the
TIMELOCKANLYSIS program.  I'm such a novice, though, I haven't figured out
the proper way to run it at all, and each of my attempts generates a new error
message.  Graphically dragging the program into the command window
generates <br>
<br>
</span></font><font size=1><span style='font-size:7.5pt'>>> run(<font
color="#cc33cc"><span style='color:#CC33CC'>'C:\Program
Files\MATLAB71\work\fieldtrip-lite-20071210\fieldtrip-lite-20071210\timelockanalysis.m'</span></font>)<br>
<font color=red><span style='color:red'>??? Error using ==> run<br>
Input argument "data" is undefined.</span></font></span></font><br>
<br>
while entering the function listed at the top of the program (<font size=1><span
style='font-size:7.5pt'>[timelock] = timelockanalysis(cfg, data)</span></font>)
results in <br>
<font size=1 color=red><span style='font-size:7.5pt;color:red'>??? Undefined
function or variable 'cfg'.</span></font><br>
<br>
How far off base am I?  Thanks so much for the reply, it's a relief to
have a chance to actually make some progress. <br>
<br>
Best,<br>
Kenton<o:p></o:p></p>

<div>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On </span></font><st1:date Month="12" Day="25"
Year="2007">Dec 25, 2007</st1:date> <st1:time Hour="13" Minute="27">1:27 PM</st1:time>,
Vladimir Litvak <<a href="mailto:v.litvak@ion.ucl.ac.uk" target="_blank">v.litvak@ion.ucl.ac.uk</a>>
wrote:<o:p></o:p></p>

<div link=blue vlink=blue>

<div>

<p style='margin-left:72.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Hi,</span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>I'd drop the EEG_ part in
the labels, but other then that your struct seems OK. The question it what is
it you are trying to do and what do you mean by '</span></font><font size=2><span
style='font-size:10.0pt'>doesn't appear to be usable for anything'</span></font><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> ?</span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Best,</span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><st1:City><st1:place><font size=2 color=navy
  face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>Vladimir</span></font></st1:place></st1:City><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font><o:p></o:p></p>

<div>

<div>

<p style='margin-left:72.0pt'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>

<p style='margin-left:108.0pt'><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>-----Original
Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> FieldTrip discussion list
[mailto:<a href="mailto:FIELDTRIP@NIC.SURFNET.NL" target="_blank">FIELDTRIP@NIC.SURFNET.NL</a>]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Kenton Hokanson<br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><st1:date
Month="12" Day="25" Year="2007"><font size=2 face=Tahoma><span lang=EN-US
 style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>Tuesday,
 December 25, 2007</span></font></st1:date><font size=2 face=Tahoma><span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>
</span></font><st1:time Hour="20" Minute="7"><font size=2 face=Tahoma><span
 lang=EN-US style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>8:07
 PM</span></font></st1:time><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'><br>
<b><span style='font-weight:bold'>To:</span></b> <a
href="mailto:FIELDTRIP@NIC.SURFNET.NL" target="_blank">FIELDTRIP@NIC.SURFNET.NL</a><br>
<b><span style='font-weight:bold'>Subject:</span></b> [FIELDTRIP] Importing
.acq dataformat</span></font><o:p></o:p></p>

<p style='margin-left:108.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>

<p style='margin-left:108.0pt'><font size=3 face=Arial><span style='font-size:
12.0pt;font-family:Arial'>Hi everyone,</span></font><o:p></o:p></p>

<p style='margin-left:108.0pt'><font size=3 face=Arial><span style='font-size:
12.0pt;font-family:Arial'>Sorry, this is a rather basic yet lengthy question,
but I've been working on my own for some time and am totally stumped.  If
there exists a more appropriate way to get an answer to this question than to
email the entire list, please let me know; otherwise, please forgive my
inexperience! </span></font><o:p></o:p></p>

<p style='mso-margin-top-alt:5.0pt;margin-right:0cm;margin-bottom:12.0pt;
margin-left:108.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>I'm trying to use FieldTrip to analyze EEG data
recorded using BioPac's "AcqKnowledge" data acquisition program (data
files are saved with extension .acq).  This is not a FieldTrip-compatible
format, but using the FT FAQ ( <a
href="http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat"
target="_blank">http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat</a>)
I found the following information for importing my dataformat. <o:p></o:p></span></font></p>

<p style='margin-left:108.0pt'><font size=1 face=Arial><span style='font-size:
7.5pt;font-family:Arial'>"Alternatively, if you already are able to read
the data into Matlab, you can reformat that data within Matlab into a datastructure
that is compatible with FieldTrip. Raw data that is comparable with the output
of preprocessing should consist of a structure with the fields </span></font><o:p></o:p></p>

<pre style='margin-left:108.0pt'><font size=1 face=Arial><span
style='font-size:7.5pt;font-family:Arial'>data.label   % cell-array containing strings, Nchan X 1<br
style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></span></font></pre><pre style='margin-left:108.0pt'><font
size=1 face=Arial><span style='font-size:7.5pt;font-family:Arial'><br
style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></span></font></pre><pre style='margin-left:108.0pt'><font
size=1 face=Arial><span style='font-size:7.5pt;font-family:Arial'>data.fsample % sampling frequency in Hz, single number<br
style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></span></font></pre><pre style='margin-left:108.0pt'><font
size=1 face=Arial><span style='font-size:7.5pt;font-family:Arial'><br
style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></span></font></pre><pre style='margin-left:108.0pt'><font
size=1 face=Arial><span style='font-size:7.5pt;font-family:Arial'>data.trial   % cell-array containing a data matrix for each trial (1 X Ntrial), each data matrix is Nchan X Nsamples <o:p></o:p></span></font></pre><pre
style='margin-left:108.0pt'><font size=1 face=Arial><span style='font-size:
7.5pt;font-family:Arial'> </span></font><o:p></o:p></pre><pre
style='margin-left:108.0pt'><font size=1 face=Arial><span style='font-size:
7.5pt;font-family:Arial'><o:p> </o:p></span></font></pre><pre
style='margin-left:108.0pt'><font size=1 face=Arial><span style='font-size:
7.5pt;font-family:Arial'><br style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></span></font></pre><pre style='margin-left:108.0pt'><font
size=1 face=Arial><span style='font-size:7.5pt;font-family:Arial'><br
style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></span></font></pre><pre style='margin-left:108.0pt'><font
size=1 face=Arial><span style='font-size:7.5pt;font-family:Arial'>data.time    % cell-array containing a time axis for each trial (1 X Ntrial), each time axis is a 1 X Nsamples vector"<o:p></o:p></span></font></pre>

<p style='margin-left:108.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>I'm able to save my data file as a single MATLAB
matrix of dimensions NSamples x NChannels (20073x10).  Using my knowledge
of the timestamps of events within the data file, I divided it up into two
trials.  Each trial is 4001 samples long, and there are six channels that
I want to analyze, so I've pasted that data into smaller matrices (Trial1 and
Trial2) each with dimensions 6 x 4001.  Having done this, I input the
following: <br>
<br>
</span></font><font size=1><span style='font-size:7.5pt'>data.label = {'EEG_CZ'
'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'}<br>
data.fsample = 1000<br>
data.trial = {Trial1 Trial2}<br>
data.time = {1:4001 1:4001} </span></font><br>
<br>
Here's the output those commands generate:<br>
<br>
<font size=1><span style='font-size:7.5pt'>data = <br>
<br>
      label: {'EEG_CZ'  'EEG_C3' 
'EEG_F3'  'EEG_FZ'  'EEG_F4'  'EEG_C4'} <br>
    fsample: 1000<br>
      trial: {[6x4001 double]  [6x4001 double]}<br>
       time: {[1x4001 double]  [1x4001
double]}<br>
</span></font><font size=2><span style='font-size:10.0pt'><br>
It would seem to me that I have created the datastructure defined on the FAQ
site.  However, the structure doesn't appear to be usable for anything (my
guess is that a cfg structure is also necessary, but I haven't found how to
create one that is functionally identical to the output of preprocessing,
define_trials, any of the read_xxx programs from fileio)...I don't know where
to begin!  I'd very much appreciate any help I could get.  Thanks, very
happy holidays. </span></font><o:p></o:p></p>

<div>

<p style='margin-left:108.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><br>
Best,<o:p></o:p></span></font></p>

</div>

</div>

</div>

<div>

<p style='margin-left:108.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Kenton Hokanson<o:p></o:p></span></font></p>

</div>

<p style='margin-left:108.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>----------------------------------<o:p></o:p></span></font></p>

<p style='margin-left:108.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>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.<o:p></o:p></span></font></p>

<p style='margin-left:108.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><a
href="http://listserv.surfnet.nl/archives/fieldtrip.html" target="_blank">http://listserv.surfnet.nl/archives/fieldtrip.html
</a><o:p></o:p></span></font></p>

<p style='margin-left:108.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><a href="http://www.ru.nl/fcdonders/fieldtrip/"
target="_blank">http://www.ru.nl/fcdonders/fieldtrip/</a><o:p></o:p></span></font></p>

<p style='margin-left:108.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>

<p style='margin-left:108.0pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>No virus found in this incoming message.<br>
Checked by AVG Free Edition.<br>
Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: </span></font><st1:date
Month="12" Day="24" Year="2007"><font size=2><span style='font-size:10.0pt'>24/12/2007</span></font></st1:date><font
size=2><span style='font-size:10.0pt'> 11:19</span></font><o:p></o:p></p>

</div>

</div>

<p style='margin-left:72.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>

<p style='margin-left:72.0pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>No virus found in this outgoing message.<br>
Checked by AVG Free Edition.<br>
Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: </span></font><st1:date
Month="12" Day="24" Year="2007"><font size=2><span style='font-size:10.0pt'>24/12/2007</span></font></st1:date><font
size=2><span style='font-size:10.0pt'> 11:19</span></font><o:p></o:p></p>

</div>

<p style='mso-margin-top-alt:5.0pt;margin-right:0cm;margin-bottom:12.0pt;
margin-left:72.0pt'><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>

<p style='margin-left:72.0pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>No virus found in this incoming message.<br>
Checked by AVG Free Edition.<br>
Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: </span></font><st1:date
Month="12" Day="24" Year="2007"><font size=2><span style='font-size:10.0pt'>24/12/2007</span></font></st1:date><font
size=2><span style='font-size:10.0pt'> 11:19</span></font><o:p></o:p></p>

</div>

</div>

</div>

</div>

<div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<p style='margin-left:36.0pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>No virus found in this outgoing message.<br>
Checked by AVG Free Edition.<br>
Version: 7.5.516 / Virus Database: 269.17.8/1195 - Release Date: </span></font><st1:date
Month="12" Day="24" Year="2007"><font size=2><span style='font-size:10.0pt'>24/12/2007</span></font></st1:date><font
size=2><span style='font-size:10.0pt'> 11:19</span></font><o:p></o:p></p>

</div>

</div>

</div>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<p style='margin-left:36.0pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>No virus found in this incoming message.<br>
Checked by AVG Free Edition.<br>
Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: </span></font><st1:date
Month="12" Day="29" Year="2007"><font size=2><span style='font-size:10.0pt'>29/12/2007</span></font></st1:date><font
size=2><span style='font-size:10.0pt'> 13:27</span></font><o:p></o:p></p>

</div>

</body>

</html>
<BR>

<P><FONT SIZE=2>No virus found in this outgoing message.<BR>
Checked by AVG Free Edition.<BR>
Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27<BR>
</FONT> </P>
<p>----------------------------------</p>
<p>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.</p>
<p>  http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p>  http://www.ru.nl/fcdonders/fieldtrip/</p>