<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Courier;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Helvetica;
        color:windowtext;}
p.p1, li.p1, div.p1
        {mso-style-name:p1;
        margin:0in;
        font-size:7.5pt;
        font-family:Courier;
        color:#028009;}
p.p2, li.p2, div.p2
        {mso-style-name:p2;
        margin:0in;
        font-size:7.5pt;
        font-family:Courier;}
p.p3, li.p3, div.p3
        {mso-style-name:p3;
        margin:0in;
        font-size:7.5pt;
        font-family:Courier;}
span.s1
        {mso-style-name:s1;
        color:black;}
span.s2
        {mso-style-name:s2;
        color:#AA04F9;}
span.s4
        {mso-style-name:s4;
        color:#028009;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:Helvetica">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica">I was performing ICA on my EEG data and the script was running smoothly until I rejected bad components using 'ft_rejectcomponent' – after that I couldn't visualize my data using databrowser and got this
 error: <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica">"Error using ft_fetch_data (line 168)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica">some of the requested samples occur twice in the data and have conflicting values"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica">This is the script I used for ICA, could you let me know what might be wrong? Thank you so much!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="p1" style="text-indent:.25in">%% ICA<span class="apple-converted-space"><span style="color:black">   
<o:p></o:p></span></span></p>
<p class="p1" style="text-indent:.25in">%Decomposition of EEG data<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>cfg<span class="apple-converted-space">           
</span>= [];<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>cfg.resamplefs = 150;<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>cfg.detrend<span class="apple-converted-space">   
</span>= <span class="s2">'no'</span>;<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>data <span class="apple-converted-space">
          </span>= ft_resampledata(cfg, data_all);<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span><o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>cfg<span class="apple-converted-space">       
</span>= [];<o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"><span style="color:black">    </span>
</span><span class="s1">cfg.method = </span><span class="s2">'runica'</span><span class="s1">;
</span>% this is the default and uses the implementation from EEGLAB<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>comp = ft_componentanalysis(cfg, data);<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    <o:p></o:p></span></p>
<p class="p1"><span class="apple-converted-space"><span style="color:black">    </span>
</span>%Identify components reflecting eye artifacts<o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"><span style="color:black">    </span>
</span>% plot the components for visual inspection<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>figure<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>cfg = [];<o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"><span style="color:black">    </span>
</span><span class="s1">cfg.component = 1:20; </span><span class="apple-converted-space"><span style="color:black">     
</span></span>% specify the component(s) that should be plotted<o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"><span style="color:black">    </span>
</span><span class="s1">cfg.layout</span><span class="apple-converted-space"><span style="color:black">   
</span></span><span class="s1">= </span><span class="s2">'acticap-64ch-standard2_XZ.mat'</span><span class="s1">;
</span>% specify the layout file that should be used for plotting<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>cfg.comment <span class="apple-converted-space">
  </span>= <span class="s2">'no'</span>;<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>ft_topoplotIC(cfg, comp)<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span><o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"><span style="color:black">    </span>
</span>%Removing bad artifacts and backprojecting data<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>cfg = [];<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>cfg.component = [1 2];
<span class="s4">% e.g. to be removed component(s)</span><o:p></o:p></p>
<p class="p2" style="text-indent:.25in">data_all = ft_rejectcomponent(cfg, comp, data_all);<o:p></o:p></p>
<p class="p2" style="text-indent:.25in"><o:p> </o:p></p>
<p class="p1"><span class="apple-converted-space"><span style="color:black">    </span>
</span>%Display data (this is where the error message occurs)<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>cfg = [];<o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"><span style="color:black">    </span>
</span><span class="s1">cfg.layout = </span><span class="s2">'acticap-64ch-standard2_XZ.mat'</span><span class="s1">;
</span>% specify the layout file that should be used for plotting<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>cfg.viewmode = <span class="s2">
'vertical'</span>;<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>ft_databrowser(cfg, data_all);<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span><o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica">Best,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica">Anqi<o:p></o:p></span></p>
</div>
</body>
</html>