gof=gof_spaceangle(tm,modfunc,oaz,oel,iaz,iel) Goodness of fit function used to compare online oaz,oel points to those derived from ideal iaz,iel using modfunc(tm,iaz,iel)
0001 function gof=gof_spaceangle(tm,modfunc,oaz,oel,iaz,iel) 0002 % gof=gof_spaceangle(tm,modfunc,oaz,oel,iaz,iel) 0003 % 0004 % Goodness of fit function used to compare online oaz,oel points to 0005 % those derived from ideal iaz,iel using modfunc(tm,iaz,iel) 0006 0007 [maz,mel]=feval(modfunc,tm,iaz,iel); 0008 0009 sa=spaceangle(oaz,oel,maz,mel,'deg'); 0010 0011 gof=sum(sa.^2);