<div dir="ltr">Dear Marco,<div><br></div><div style>Try my backprojection toolbox. Unzip it and locate the folder under /eeglab/plugins and relaunch eeglab. Let me know if it is useful. Currently this is not distributed, but if you say it is useful I'll consider distributing it.</div>

<div style><br></div><div style>Makoto</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/13 Marco Bellami <span dir="ltr"><<a href="mailto:mrcbellami@gmail.com" target="_blank">mrcbellami@gmail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Hi Makoto<br>
      <br>
      thank you so much for your suggestion.<br>
      <br>
      I took a look to  std_envtopo. However, can you help me in
      understanding how to use this plugin to extract a matrix with
      size  [number_of_channels, times],  having in each row the erp of
      the selected cluster ( e.g. cluster 2) projected  on one channel
      (e.g. on Fp1)?<br>
      <br>
      Thank you again<br>
      <br>
      Marco<br>
      <br>
        <br>
      <br>
      Il 12/06/2013 21:34, Makoto Miyakoshi ha scritto:<br>
    </div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">Dear Marco,
        <div><br>
        </div>
        <div>Without reading your code, let me first ask if you
          have tried std_envtopo(). That plugin is available since
          version 11. After clustering, go to 'edit/plot cluster' and
          you'll find the button in the bottom in the GUI. It seems that
          is the function you need. If not, please let me know the
          difference.</div>
        <div><br>
        </div>
        <div>Makoto</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">2013/6/10 Marco Bellami <span dir="ltr"><<a href="mailto:mrcbellami@gmail.com" target="_blank">mrcbellami@gmail.com</a>></span><br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
            <br>
            I performed an ICA decomposition on my raw EEG data (for
            each subject<br>
            and condition). Then, I created a STUDY and a design and I
            clustered ICs.<br>
            Now, I want to calculate, for each cluster and condition of
            my design,<br>
            the projection of the ERP of the cluster on the channels and
            I'd like to<br>
            know if my approach is correct.<br>
            First, I calculated the projection on the scalp of each
             component of<br>
            each cluster (using the icaproj function). Then, I averaged
            the<br>
            projected ERPs between the components of the same cluster:<br>
            <br>
            for example,  let clust=1<br>
            <br>
              for cond = 1:total_conditions % choose a condition (from
            STUDY.condition)<br>
            <br>
                     % compute average cluster ERP projected on EEG
            channels<br>
            <br>
                     for ic =
            1:length(STUDY.cluster(clust).allinds{cond}) % for<br>
            each component in the cluster<br>
            <br>
                         design_idx =
            STUDY.cluster(clust).setinds{cond}(1,ic);<br>
                         setidx =
            STUDY.design(design_number).cell(design_idx).dataset;<br>
                         %select the component<br>
                         comp =
            STUDY.cluster(clust).allinds{cond}(1,ic);<br>
                         %load the dataset with the selected component<br>
                         [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG,
            EEG,<br>
            CURRENTSET,...<br>
                         'retrieve',setidx,'study',CURRENTSTUDY);<br>
            <br>
                         winvs =<br>
ALLEEG(setidx).icawinv(:,:)*STUDY.cluster(clust).topopol(ic);<br>
                         % calculate the projection of the IC on all
            channels<br>
prjics(:,:,ic)=icaproj2(mean(ALLEEG(setidx).data(:,:,:),3),pinv(winvs),comp);<br>
            <br>
                     end;<br>
                     %average projection over trials<br>
                     prjclus=mean(prjics,3);<br>
            <br>
            Thanks,<br>
            <br>
            Marco<br>
            <br>
            _______________________________________________<br>
            Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
            To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
            For digest mode, send an email with the subject "set digest
            mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr">Makoto Miyakoshi<br>
          Swartz Center for Computational Neuroscience<br>
          Institute for Neural Computation, University of California San
          Diego<br>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div>


</div>