ean(S2,2)); <span class="keyword">end</span>;
0087 C12=S12./sqrt(S1.*S2);
0088 C=abs(C12);
0089 phi=angle(C12);
0090 <span class="keyword">if</span> nargout==10; 
0091   <span class="keyword">if</span> fscorr==1; 
0092      [confC,phistd,Cerr]=coherr(C,J1,J2,err,trialave,[],Nsp2);
0093   <span class="keyword">else</span>
0094      [confC,phistd,Cerr]=coherr(C,J1,J2,err,trialave);
0095   <span class="keyword">end</span>;
0096 <span class="keyword">elseif</span> nargout==9;
0097   <span class="keyword">if</sp