<html xmlns:v="urn:schemas-microsoft-com:vml" 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=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Greetings,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I am adapting the beamformer tutorial to my data. When I </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>sourceinterpolate</span><span lang=EN-US> the subtracted sourceA from sourceB data, the ‘pos’ disappears. This seems to be important for the volume normalization and Grand Average. I am running Fieldtrip version: 20110917. I have placed the code below.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Many thanks in advance.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Jason<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>Young_CombineFilter_sourceDiff_16_3={};</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>for</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> i=1:length(Young_CombineFilter_beamform_16_3);</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> cfg=[];</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> Young_CombineFilter_sourceDiff_16_3{i} =Young_CombineFilter_beamform_16_3{i}.sourceA;</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> Young_CombineFilter_sourceDiff_16_3{i}.avg.pow =(Young_CombineFilter_beamform_16_3{i}.sourceA.avg.pow - Young_CombineFilter_beamform_16_3{i}.sourceB.avg.pow)./Young_CombineFilter_beamform_16_3{i}.sourceB.avg.pow;</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> cfg = [];</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> cfg.downsample = 2;</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> cfg.parameter = </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A020F0'>'avg.pow'</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> cfg.anatomy = mri{i};</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> cfg.keepfilter=</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A020F0'>'yes'</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> cfg.interpmethod=</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A020F0'>'linear'</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> Young_CombineFilter_sourceDiffInt_16_3{i}=ft_sourceinterpolate(cfg,Young_CombineFilter_sourceDiff_16_3{i}, mri_young{i});</span><span lang=EN-US style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:blue'>end</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span><span style='font-size:12.0pt;font-family:"Courier New"'><o:p></o:p></span></p></div></body></html>