



S3map = zeros(sx1, sy1); 
CSum3(nbasis, M2mapAll, FxAll, FyAll, S3map, sx1, sy1, sub1, outResp);
if (showon>.5)
outepsgif(S3map, 'ex7_S3'); 
end

[M3score indM3] = max(S3map(:));
yMax = ceil(indM3/sx1); % center position of detected object
xMax = indM3 - (yMax-1)*sx1;


