<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Dear All,<br>
    <br>
    I have not been able to use ft_sourceanalysis since I updated to
    Matlab 2016a and I've had to run by analyses using older versions of
    FT and Matlab 2015b. I'd like to resolve these issues. The flow of
    computation I'm using has always worked up until now. I'm trying to
    debug this myself but since I'm sure I'm not the only person who's
    had this issue I thought someone in the group could help out.<br>
    <br>
    When I attempt to source localize frequency data using eLORETA I get
    the following error:<br>
    <br>
    Error using cellfun<br>
    Input #2 expected to be a cell array, was double instead.<br>
    <br>
    Error in ft_datatype_sens (line 221)<br>
          if any(~cellfun(@isempty, regexp(sens.chanunit, '^T')))<br>
    <br>
    Error in ft_checkconfig (line 242)<br>
      cfg.elec = ft_datatype_sens(struct(cfg.elec));<br>
    <br>
    Error in ft_preamble_trackconfig (line 37)<br>
    cfg = ft_checkconfig(cfg, 'trackconfig', 'on');<br>
    <br>
    Error in ft_preamble (line 56)<br>
        evalin('caller', ['ft_preamble_' cmd]);<br>
    <br>
    Error in ft_sourceanalysis (line 157)<br>
    ft_preamble trackconfig<br>
    <b><br>
    </b><b>To get the frequency data I use ft_freqanalysis with
      parameters:</b><br>
    <br>
    cfg.foi = 20;<br>
    cfg.method = 'mtmfft'<br>
    cfg.tapsmofreq = 3;<br>
    cfg.output = 'powandcsd';<br>
    <br>
    This generates a structure with the following fields:<br>
    <br>
    <br>
            label: {68x1 cell}<br>
           dimord: 'chan_freq'<br>
             freq: 20<br>
        powspctrm: [68x1 double]<br>
         labelcmb: {2278x2 cell}<br>
        crsspctrm: [2278x1 double]<br>
              cfg: [1x1 struct]<br>
    <br>
    <b>For source analysis I'm using the built-in FT BEM</b><br>
    <br>
    cfg.headmodel = vol; %after loading standard_bem from FT templates<br>
    cfg.grid.resolution = 5; %Automatic 5 mm grid<br>
    cfg.elec = elec_aligned; %a home-grown file containing data for our
    custom electrode montage<br>
    cfg.method = 'eloreta';<br>
    <br>
    Thanks!<br>
    <br>
    Alexander<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Alexander Nakhnikian, Ph.D.
Research Investigator
VA Boston Healthcare System
Instructor in Psychiatry, Harvard Medical School
</pre>
  </body>
</html>