<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><SPAN style="RIGHT: auto">
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>Fieldtrip users:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; RIGHT: auto" class=MsoNormal><FONT face=Calibri>Well, I managed to get the remote start/stop of GDF files working via the TCP/IP port.<SPAN style="mso-spacerun: yes">  </SPAN>It is not that complicated, but there are some ambiguities in the documentation, so I thought I would post the solution in case it helped anyone else.<SPAN style="mso-spacerun: yes">  </SPAN><o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>Apparently there is a fifth argument that can be given to the biosemi2ft code.<SPAN style="mso-spacerun: yes">  </SPAN>I had seen the listing of the command as:<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>biosemi2ft <config-file> <gdf-file> <hostname> <port><o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; RIGHT: auto" class=MsoNormal><FONT style="RIGHT: auto" face=Calibri>However, if you give it a 5<SUP>th</SUP> argument, that works as the port to which to control the ODM, if not specified the control port is 8000, since I had been trying to use the local default port (1972) that is why I was having issues.<SPAN style="RIGHT: auto; mso-spacerun: yes">  At some spoint someone may want to update the documentation to specify that the control port default is 8000, and not the port use<VAR id=yui-ie-cursor></VAR>d for the buffer.  </SPAN>I was able to control the saving of the GDF files by just using the matlab tcp_udp_ip toolbox:<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>host = 'localhost';<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>port = 8000;<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>con=pnet('tcpconnect',host,port)<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>pnet(con,'setwritetimeout',2)<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>[ip,port]=pnet(con,'gethost')<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>stat=pnet(con,'status')<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>msg = 'SAVE START';<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>pnet(con,'printf','\n%s\n',msg);<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>pause(5)<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>msg = 'SAVE STOP';<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>pnet(con,'printf','\n%s\n',msg);<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>pause(5)<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>% <o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>pnet(con,'close')<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>Best,<o:p></o:p></FONT></div>
<div style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal><BR><FONT face=Calibri>Eric<o:p></o:p></FONT></div>
<div style="RIGHT: auto"><BR style="RIGHT: auto" class=yui-cursor></SPAN></div>
<div style="RIGHT: auto"><BR style="RIGHT: auto"></div>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV dir=ltr>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr contentEditable=false readonly="true"></DIV><FONT size=2 face=Arial><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> "fieldtrip-request@science.ru.nl" <fieldtrip-request@science.ru.nl><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> fieldtrip@science.ru.nl <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Tuesday, October 8, 2013 5:41 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> fieldtrip Digest, Vol 35, Issue 11<BR></FONT></DIV>
<DIV class=y_msg_container><BR>Send fieldtrip mailing list submissions to<BR>    <A href="mailto:fieldtrip@science.ru.nl" ymailto="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</A><BR><BR>To subscribe or unsubscribe via the World Wide Web, visit<BR>    <A href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target=_blank>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</A><BR>or, via email, send a message with subject or body 'help' to<BR>    <A href="mailto:fieldtrip-request@science.ru.nl" ymailto="mailto:fieldtrip-request@science.ru.nl">fieldtrip-request@science.ru.nl</A><BR><BR>You can reach the person managing the list at<BR>    <A href="mailto:fieldtrip-owner@science.ru.nl" ymailto="mailto:fieldtrip-owner@science.ru.nl">fieldtrip-owner@science.ru.nl</A><BR><BR>When replying, please edit your Subject line so it is more specific<BR>than "Re: Contents of fieldtrip
 digest..."<BR><BR><BR>Today's Topics:<BR><BR>  1. definetrial with ANT .cnt files (Epstein, Michael)<BR>  2. Automatically saving GDF using the realtime buffer<BR>      (Eric Pohlmeyer)<BR>  3. Re: Using Atlas ROIs in EEG Source Statistics<BR>      (ft_sourcestatistics) (Roey Schurr)<BR><BR><BR>----------------------------------------------------------------------<BR><BR>Message: 1<BR>Date: Tue, 8 Oct 2013 15:50:07 +0000<BR>From: "Epstein, Michael" <<A href="mailto:MEpstein@NKI.RFMH.ORG" ymailto="mailto:MEpstein@NKI.RFMH.ORG">MEpstein@NKI.RFMH.ORG</A>><BR>To: FieldTrip discussion list <<A href="mailto:fieldtrip@science.ru.nl" ymailto="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</A>><BR>Subject: [FieldTrip] definetrial with ANT .cnt files<BR>Message-ID: <<A href="mailto:3E54C3C165B1F2428D0A866C8A04ADBD011246@nki-exchdb2"
 ymailto="mailto:3E54C3C165B1F2428D0A866C8A04ADBD011246@nki-exchdb2">3E54C3C165B1F2428D0A866C8A04ADBD011246@nki-exchdb2</A>><BR>Content-Type: text/plain; charset="us-ascii"<BR><BR>Hi all,<BR><BR>I'm having a problem defining triggers using ft_definetrial  with ANT .cnt files. Say I want to do a simple epoching around events with a trigger code of 1 - when I put in cfg.trialdef.eventvalue = 1; I get an error saying no trials are defined. However I figured out that if I put in cfg.trialdef.eventvalue =[1 char(0) char(0)]; then it works fine. The trigger files look totally normal, and other programs don't seem to have this issue. Anyone else ever have a problem like this?<BR><BR>Thanks,<BR><BR>-Michael<BR><BR>IMPORTANT NOTICE: This e-mail is meant only for the use of the intended recipient. It may contain confidential information which is legally privileged or otherwise protected by law. If you received this e-mail in error or from someone who is
 not authorized to send it to you, you are strictly prohibited from reviewing, using, disseminating, distributing or copying the e-mail. PLEASE NOTIFY US IMMEDIATELY OF THE ERROR BY RETURN E-MAIL AND DELETE THIS MESSAGE FROM YOUR SYSTEM. Thank you for your cooperation.<BR>-------------- next part --------------<BR>An HTML attachment was scrubbed...<BR>URL: <<A href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131008/1e2d4cb0/attachment-0001.html" target=_blank>http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131008/1e2d4cb0/attachment-0001.html</A>><BR><BR>------------------------------<BR><BR>Message: 2<BR>Date: Tue, 8 Oct 2013 06:01:11 -0700 (PDT)<BR>From: Eric Pohlmeyer <<A href="mailto:notthemindprobe@yahoo.com" ymailto="mailto:notthemindprobe@yahoo.com">notthemindprobe@yahoo.com</A>><BR>To: "<A href="mailto:fieldtrip@science.ru.nl" ymailto="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</A>"
 <<A href="mailto:fieldtrip@science.ru.nl" ymailto="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</A>><BR>Subject: [FieldTrip] Automatically saving GDF using the realtime<BR>    buffer<BR>Message-ID:<BR>    <<A href="mailto:1381237271.38083.YahooMailNeo@web165005.mail.bf1.yahoo.com" ymailto="mailto:1381237271.38083.YahooMailNeo@web165005.mail.bf1.yahoo.com">1381237271.38083.YahooMailNeo@web165005.mail.bf1.yahoo.com</A>><BR>Content-Type: text/plain; charset="iso-8859-1"<BR><BR>Fieldtrip:<BR>?<BR>Hi, I am a new user of Fieldtrip, but our lab has a (pretty well working) real-time analysis of BioSemi EEG using?two computers, matlab, and the FieldTrip buffer.? The buffer is used for communicating?data between two machines: machine A?collects and saves?the data while also writingto the buffer, and machine B uses matlab to read the data off of the buffer (TCP/IP connection) and then run a soft real-time
 analysis of the EEG data.<BR>?<BR>Currently we manually start and stop?the saving of a GDF file on?machine A by hitting the S and D keys.<BR>?<BR>I would like to automatically start and stop the file saving, and was wondering if anyone had any suggestions?? I read that the OnlineDataManager (which interacts with our biosemi2ft code) handles the saving, and also does listen for ASCII messages on a TCP port for various commands, including "SAVE START/STOP".? Unfortunately, I'm not a programmer, and haven't been able to figure out how to write those commands to the port.? Is there a way to use the ft_write_data (or similar) to do that?? How do you make address the command to the specific port?<BR>?<BR>Any suggestions would be greatfully received.<BR>?<BR>Thanks!<BR>?<BR>Eric<BR>-------------- next part --------------<BR>An HTML attachment was scrubbed...<BR>URL: <<A
 href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131008/0e09033e/attachment-0001.html" target=_blank>http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131008/0e09033e/attachment-0001.html</A>><BR><BR>------------------------------<BR><BR>Message: 3<BR>Date: Wed, 9 Oct 2013 00:41:19 +0300<BR>From: Roey Schurr <<A href="mailto:roeysc@gmail.com" ymailto="mailto:roeysc@gmail.com">roeysc@gmail.com</A>><BR>To: FieldTrip discussion list <<A href="mailto:fieldtrip@science.ru.nl" ymailto="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</A>><BR>Subject: Re: [FieldTrip] Using Atlas ROIs in EEG Source Statistics<BR>    (ft_sourcestatistics)<BR>Message-ID:<BR>    <<A href="mailto:CAHm4wZD573rYbo5U_DA8ej1Dny5-f7a3QuE2jn6_Dn26kWgriA@mail.gmail.com"
 ymailto="mailto:CAHm4wZD573rYbo5U_DA8ej1Dny5-f7a3QuE2jn6_Dn26kWgriA@mail.gmail.com">CAHm4wZD573rYbo5U_DA8ej1Dny5-f7a3QuE2jn6_Dn26kWgriA@mail.gmail.com</A>><BR>Content-Type: text/plain; charset="iso-8859-1"<BR><BR>Dear fieldtrippers (Jan-Mathijs included),<BR><BR>(This message seems long, but is actually quite simple)<BR><BR>Having downloaded the latest fieldtrip version (20131008), we tried<BR>rerunning the code and got the following error:<BR><BR>    ??? Reference to non-existent field 'coordsys'.<BR><BR>    Error in ==> ft_volumelookup at 206<BR>          if    strcmp(cfg.inputcoord, 'mni') &&<BR>          strcmp(atlas.coordsys, 'tal')<BR><BR>    Error in ==> statistics_wrapper at 136<BR>            tmp = ft_volumelookup(tmpcfg, varargin{1});<BR><BR>    Error in ==> ft_sourcestatistics at 107<BR> 
       [stat, cfg] = statistics_wrapper(cfg, varargin{:});<BR><BR><BR>Since the spm8 MNI atlas indeed has no "coordsys" field.<BR>Even if we bypass this problem (by setting "atlas.coordsys = 'mni' " by<BR>hand, or by simply deleting that "if" line), we still get one of two errors:<BR><BR>* * * * * (1) * * * * *<BR>If we define "cfg.roi = AAL_names;" where AAL_names stores all 90 ROIs the<BR>MNI atlas has to offer, we get an indices error:<BR><BR>    ??? Subscript indices must either be real positive integers or<BR>    logicals.<BR><BR>    Error in ==> statistics_wrapper at 213<BR>          tmp(i,:) = mean(dat(roi,:), 1);<BR><BR>    Error in ==> ft_sourcestatistics at 107<BR>        [stat, cfg] = statistics_wrapper(cfg, varargin{:});<BR><BR><BR>* * * * * (2) * * * * *<BR>If we define "cfg.roi = AAL_names{1};" for example, we get a
 different<BR>error:<BR><BR>    ??? In an assignment  A(:) = B, the number of elements in A and<BR>    B must be the same.<BR><BR>    Error in ==> clusterstat at 187<BR>        tmp(cfg.inside) = postailobs;<BR><BR>    Error in ==> ft_statistics_montecarlo at 326<BR>      [stat, cfg] = clusterstat(cfg, statrand,<BR>      statobs,'issource',issource);<BR><BR>    Error in ==> statistics_wrapper at 298<BR>        [stat, cfg] = statmethod(cfg, dat, design,<BR>        'issource',issource);<BR><BR>    Error in ==> ft_sourcestatistics at 107<BR>        [stat, cfg] = statistics_wrapper(cfg, varargin{:});<BR><BR>And in "cluserstat" appears this comment: "%this snippet is to support<BR>correct clustering of N-dimensional data, not fully tested yet".<BR>Changing line 187 to:
 "tmp(cfg.inside) = postailobs(1);" (and line 211 to<BR>"tmp(cfg.inside) = negtailobs(1);") prevents this problem, but misuses the<BR>variables vectors "postailobs" and "negtailobs"<BR><BR><BR>Any ideas on how to solve this atlas source statistics problem (defining<BR>the coordsys field, performing statistics across all ROIs, and using the<BR>postailobs/negtailobs vectors) would be greatly appreciated!<BR><BR>Good night,<BR>Aia and Roey<BR><BR><BR>On Tue, Oct 8, 2013 at 9:43 AM, Roey Schurr <<A href="mailto:roeysc@gmail.com" ymailto="mailto:roeysc@gmail.com">roeysc@gmail.com</A>> wrote:<BR><BR>> Dear Jan-Mathijs,<BR>><BR>> Thank you so much for your kind and quick answer!<BR>> We do hope this will fix things up. We will check it asap.<BR>><BR>> Best regards,<BR>> Aia and Roey<BR>><BR>><BR>><BR>><BR>> On Tue, Oct 8, 2013 at 9:38 AM, jan-mathijs schoffelen <<BR>> <A href="mailto:jan.schoffelen@donders.ru.nl"
 ymailto="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</A>> wrote:<BR>><BR>>> Dear Roey and Aia,<BR>>><BR>>> This indeed was our bad. We have fixed it in the current version of<BR>>> FieldTrip.<BR>>> The version will be available for download tonight (CET), but you can get<BR>>> an instantaneous update of the code repository by doing 'ft_version update'<BR>>> on the Matlab command line.<BR>>> This will update the fieldtrip copy you are using to the latest version.<BR>>> Note that if you want to keep a 'static' version, you need to back up the<BR>>> version with a fixed date, because all changes will be incorporated.<BR>>><BR>>> A little note to the following piece of code:<BR>>><BR>>> % Load the Atlas<BR>>>> templateDir = which('ft_defaults'); % use a known function (ft_defaults)<BR>>>> to find FieldTrip's
 directory<BR>>>> backslashIndices = find(templateDir=='\');<BR>>>> templateDir(backslashIndices(end)+1:end) = [];      clear<BR>>>> backslashIndices;<BR>>>> cfg.atlas = [templateDir, 'template\atlas\aal\ROI_MNI_V4.nii'];<BR>>>><BR>>><BR>>> The same can be achieved with the fullfile function (which deals with<BR>>> platform specific file-separators automatically):<BR>>><BR>>> templateDir=which('ft_defaults');<BR>>> cfg.atlas = fullfile(templateDir,template,atlas,ROI_MNI_V4.nii');<BR>>><BR>>><BR>>> Best,<BR>>> Jan-Mathijs<BR>>><BR>>><BR>>><BR>>> On Oct 8, 2013, at 8:25 AM, Roey Schurr wrote:<BR>>><BR>>> Hello again,<BR>>><BR>>> Sorry, it seems like the older version (with ft_volumelookup) is just<BR>>> our mistake.<BR>>> However the problem is still relevant, for the function
 volumelookup is<BR>>> still undefinded in our case.<BR>>><BR>>> Hopefully someone might know what we did wrong.<BR>>><BR>>> Thank you once again!<BR>>> Aia and Roey<BR>>><BR>>><BR>>> On Tue, Oct 8, 2013 at 12:54 AM, Roey Schurr <<A href="mailto:roeysc@gmail.com" ymailto="mailto:roeysc@gmail.com">roeysc@gmail.com</A>> wrote:<BR>>><BR>>>> Hello all,<BR>>>><BR>>>> We are having some problems defining atlas-based ROIs using<BR>>>> ft_sourcestatistics on two source structures obtained via ft_sourceanalysis<BR>>>> (whose grid is later changed according to a precalculated MNI-warped grid).<BR>>>><BR>>>> It seems like the function "statistics_wrapper" has changed between<BR>>>> "fieldtrip-20130822" and "fieldtrip-20131007": line 136 now calls<BR>>>> "volumelookup" and not "ft_volumelookup", so we get the following
 error:<BR>>>><BR>>>>      ??? Undefined function or method 'volumelookup' for input<BR>>>>      arguments of type 'struct'.<BR>>>><BR>>>>      Error in ==> statistics_wrapper at 136<BR>>>>              tmp = volumelookup(tmpcfg, varargin{1});<BR>>>><BR>>>> Using the older fieldtrip vesion we get this error:<BR>>>>    ??? Subscript indices must either be real positive integers or<BR>>>>    logicals.<BR>>>><BR>>>>      Error in ==> statistics_wrapper at 213<BR>>>>            tmp(i,:) = mean(dat(roi,:), 1);<BR>>>><BR>>>>      Error in ==> ft_sourcestatistics at 107<BR>>>>          [stat, cfg] = statistics_wrapper(cfg,
 varargin{:});<BR>>>><BR>>>> So it seems like we didn't define the ROIs correctly, however we are not<BR>>>> sure why.<BR>>>><BR>>>> Any suggestions would be greatly appreciated!<BR>>>> The relevant pieceof code is attached.<BR>>>><BR>>>> Thank you all,<BR>>>> Aia and Roey<BR>>>><BR>>>><BR>>>><BR>>>> Relevant code<BR>>>> ============<BR>>>> % Convert sources units to mm, to fit the atlas's units<BR>>>> sourceCondition1 = ft_convert_units(sourceCondition1, 'mm');<BR>>>> sourceCondition2 = ft_convert_units(sourceCondition2, '<BR>>>> design = [ ones(1,length(sourceCondition1.trial)),<BR>>>> 2*ones(1,length(sourceCondition2.trial)) ];<BR>>>><BR>>>> cfg = [];<BR>>>> cfg.dim = sourceCondition1.dim;<BR>>>> cfg.method = 'montecarlo';<BR>>>>
 cfg.statistic = 'indepsamplesT';<BR>>>> cfg.parameter = 'pow';<BR>>>> cfg.correctm = 'cluster';<BR>>>> cfg.numrandomization = 1000;<BR>>>> cfg.alpha = 0.01;<BR>>>> cfg.tail = 0;<BR>>>> cfg.design(1,:) = design;<BR>>>> cfg.ivar = 1;<BR>>>><BR>>>> % Load the Atlas<BR>>>> templateDir = which('ft_defaults'); % use a known function (ft_defaults)<BR>>>> to find FieldTrip's directory<BR>>>> backslashIndices = find(templateDir=='\');<BR>>>> templateDir(backslashIndices(end)+1:end) = [];      clear<BR>>>> backslashIndices;<BR>>>> cfg.atlas = [templateDir, 'template\atlas\aal\ROI_MNI_V4.nii'];<BR>>>><BR>>>><BR>>>> cfg.roi = AAL_names; % This is a cell array of the atlas's ROIs:<BR>>>> "Precentral_L", "Precentral_R", etc/<BR>>>><BR>>>> cfg.avgoverroi  =
 'yes';<BR>>>> cfg.hemisphere  = 'both';<BR>>>> cfg.inputcoord  = 'mni';<BR>>>><BR>>>> stat = ft_sourcestatistics(cfg, sourceCondition1, sourceCondition2);<BR>>>><BR>>>><BR>>> _______________________________________________<BR>>> fieldtrip mailing list<BR>>> <A href="mailto:fieldtrip@donders.ru.nl" ymailto="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</A><BR>>> <A href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target=_blank>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</A><BR>>><BR>>><BR>>>    Jan-Mathijs Schoffelen, MD PhD<BR>>><BR>>> Donders Institute for Brain, Cognition and Behaviour,<BR>>> Centre for Cognitive Neuroimaging,<BR>>> Radboud University Nijmegen, The Netherlands<BR>>><BR>>> Max Planck Institute for Psycholinguistics,<BR>>> Nijmegen, The
 Netherlands<BR>>><BR>>> <A href="mailto:J.Schoffelen@donders.ru.nl" ymailto="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</A><BR>>> Telephone: +31-24-3614793<BR>>><BR>>> <A href="http://www.hettaligebrein.nl/" target=_blank>http://www.hettaligebrein.nl/</A><BR>>><BR>>><BR>>> _______________________________________________<BR>>> fieldtrip mailing list<BR>>> <A href="mailto:fieldtrip@donders.ru.nl" ymailto="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</A><BR>>> <A href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target=_blank>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</A><BR>>><BR>><BR>><BR>-------------- next part --------------<BR>An HTML attachment was scrubbed...<BR>URL: <<A href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131009/47725795/attachment.html"
 target=_blank>http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131009/47725795/attachment.html</A>><BR><BR>------------------------------<BR><BR>_______________________________________________<BR>fieldtrip mailing list<BR><A href="mailto:fieldtrip@donders.ru.nl" ymailto="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</A><BR><A href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target=_blank>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</A><BR><BR>End of fieldtrip Digest, Vol 35, Issue 11<BR>*****************************************<BR><BR><BR></DIV></DIV></DIV></div></body></html>