%purpose of this is to figure out the general strategy of
%offers from people of a certain degree
function result = sim(indata, degree, y)
result = zeros(1,3);
for counter = 1:200
    if indata(counter,y) == degree
        result(1,1) = result(1,1) + indata(counter,4);
        result(1,2) = result(1,2) + 1;
    end
end
if result(1,2) == 0
    result(1,2) = 1;
end
result(1,3) = result(1,1) / result(1,2);