function NewOpinions = BEBA_UpdateOpinion(OldOpinions, InteractionNetwork)

Weights = InteractionNetwork{2};
NewOpinions = nan*ones(size(OldOpinions));

for id_agent = 1:size(OldOpinions,1)
    row_weight = sum(Weights(id_agent,:));
    if row_weight>0
        % Evolve acccording to the French-DeGroot model

        NewOpinions(id_agent) = (Weights(id_agent,:)*OldOpinions)*(1/row_weight);

    else

        NewOpinions(id_agent) = sign(OldOpinions(id_agent));

    end

    % Bound between -1 and 1
    NewOpinions(id_agent) = max([-1 min([1 NewOpinions(id_agent)])]);

end


end