function [m losses]=mc_study(regulator_parameters,system,range,n,co)
p=0;
[H u]=load_H(co);  
losses=zeros(4,n);

for i=1:n
    apriori(3)=range.P0;
    system.b=range.b0 + apriori(3)*randn;
    apriori(2)=range.b0;
    apriori(1)=range.y0; %+ range.y0_range*randn;
    while (system.b==0)
        system.b=range.b0 + apriori(3)*randn;
    end
    %while (apriori(2)==0)
    %    apriori(2)=range.b0 + apriori(3)*randn;
    %end
    seed=randn(1,regulator_parameters.horizont);
    
    losses(1,i)=ce(regulator_parameters,system,apriori,seed);
    losses(2,i)=cc(regulator_parameters,system,apriori,seed);
    losses(3,i)=rizeni(H,u,system,apriori,seed);
    losses(4,i)=alstr(regulator_parameters,system,apriori,seed);
    
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