function f = computeQuad1(y1, y2)

n = length(y1);
f = 0;

for i =1:n
    
    %f = f + 1/(n) * sum(sum(y1{i}, 2).*sum(y2{i}, 2));
    f = f + size(y1{i}, 2)/(n) * sum(sum(y1{i}, 2).*sum(y2{i}, 2));

end

end

