function [m losses]=mc_study2(regulator_parameters,system,range,n,co,a)
p=0;
[H u]=load_H(co);  

for i=1:n
    apriori(3)=range.P0;
    system.b=a*range.b0+ apriori(3)*randn;
    apriori(2)=range.b0;
    apriori(1)=range.y0;
    while (system.b==0)
        system.b=range.b0 + apriori(3)*randn;
    end
    seed=randn(1,regulator_parameters.horizont);
    j=1;
    losses(j,i)=cc(regulator_parameters,system,apriori,seed);j=j+1;
    %losses(j,i)=ps(regulator_parameters,system,apriori,seed);j=j+1;
    losses(j,i)=rizeni(H,u,system,apriori,seed);j=j+1;
    %losses(j,i)=triv(regulator_parameters,system,apriori,seed);j=j+1;
    losses(j,i)=alstr(regulator_parameters,system,apriori,seed);j=j+1;
    
end
%losses=min(losses,10);
if p==1
    for i=1:size(losses,1)
        figure   
        hist(min(losses(i,:),10),100);    AXIS([0 10 0 200]);   TITLE([median(losses(i,:)) mean(losses(i,:))]) 
    end
end
m=mean(losses,2);
end