function biased_opinions = BiasingFunction(initial_opinions, des_mean)


    aux_counter_2 = 0;
    while (abs(mean(initial_opinions)-des_mean)>=1e-3)&&(aux_counter_2<1e4)
        aux_counter_2 = aux_counter_2 + 1;

        if des_mean>0.45

            if mean(initial_opinions) < des_mean
                % Increse the mean
                initial_opinions = ModulatingFunction(initial_opinions, 0.7);
            else
                % Decrease the mean
                initial_opinions = ModulatingFunction(initial_opinions, 1.3);
            end

        else

            if mean(initial_opinions) < des_mean
                % Increse the mean
                initial_opinions = initial_opinions*1.01;

                for id_row =1:size(initial_opinions,1)
                    initial_opinions(id_row) = min([1 max([-1 initial_opinions(id_row)])]);
                end

            else
                % Decrease the mean
                initial_opinions = initial_opinions*0.95;
            end
            

        end



    end

    if (abs(mean(initial_opinions)-des_mean)<1e-3)
        biased_opinions = initial_opinions;
    else
        biased_opinions = nan;
    end

end