<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div id="divBdy" class="bdyItmPrt" _fallwcm="1">
<div>
<div>
<div dir="ltr"><font color="black" face="Tahoma" size="2"><span style="font-size: 10pt;" dir="ltr">
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;">Dear colleagues,</span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;">Sorry, I posted much on the list recent time. I want to figure out how to run SAM analysis on my data.</span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier"> </font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier">When I run
</font><font face="Courier" size="2"><span style="font-size: 10pt;">'lcmv' beamformer on my averaged dataset</span></font><font face="Courier"> it works fine:</font></span></font></div>
<div style="margin: 0pt 0pt 0pt 36pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">cfg</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">
</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">= [];</span></font></span></font></div>
<div style="margin: 0pt 0pt 0pt 36pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">cfg.grad</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">
</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">= hdr.grad;</span></font></span></font></div>
<div style="margin: 0pt 0pt 0pt 36pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">cfg.method =</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">
</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">'lcmv';</span></font></span></font></div>
<div style="margin: 0pt 0pt 0pt 36pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">cfg.grid</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">
</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">= grid;</span></font></span></font></div>
<div style="margin: 0pt 0pt 0pt 36pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">cfg.vol</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">
</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">= vol_cm;</span></font></span></font></div>
<div style="margin: 0pt 0pt 0pt 36pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">cfg.reducerank=2;</span></font></span></font></div>
<div style="margin: 0pt 0pt 0pt 36pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">cfg.keepfilter = 'yes'</span></font></span></font></div>
<div style="margin: 0pt 0pt 0pt 36pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">cfg.channel</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">
</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">= MAG; %MAG = {'MEG0721', 'MEG0731',... }</span></font></span></font></div>
<div style="margin: 0pt 0pt 0pt 36pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">source</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">
</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">= ft_sourceanalysis(cfg, tlckavg);</span></font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;"> </span></font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;"> </span></font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">When I do the same with
</span></font><font face="Courier"> </font><font face="Courier" size="2"><span style="font-size: 10pt;">cfg.method =</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">
</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">'sam'</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">
</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">option,
</span></font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">I get the error:</span></font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">*****************************</span></font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier">??? Undefined function or method 'beamformer_sam' for input arguments of type 'struct'.</font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier"> </font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier">Error in ==> sourceanalysis at 1158</font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier">
</font><font face="Courier">dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)),</font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier">
</font><font face="Courier">optarg{:});</font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier"> </font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier">Error in ==> ft_sourceanalysis at 11</font></span></font></div>
<div style="padding: 0pt 0pt 1pt; border-width: 4px 4px 3pt; border-style: none none dotted;">
<div style="margin: 0pt; padding: 0pt; border-width: 4px; border-style: none;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier">[varargout{1:nargout}] = funhandle(varargin{:});</font></span></font></div>
</div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier"> </font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier">Does anybody know how to make the ‘SAM’ option to work?</font><font face="Courier">
</font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier">Does anybody used
</font><font face="Courier" size="2"><span style="font-size: 10pt;">cfg.method =</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">
</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">'sam'</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">
</span></font><font face="Courier" size="2"><span style="font-size: 10pt;">option in the Fieldtrip???</span></font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;"> </span></font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">Regards,</span></font></span></font></div>
<div style="margin: 0pt;"><font face="Cambria" size="3"><span style="font-size: 12pt;"><font face="Courier" size="2"><span style="font-size: 10pt;">Elena</span></font></span></font></div>
</span></font></div>
</div>
</div>
</div>
</div>
</body>
</html>