function losses=mc_study2(system,range,n) load 'eta.txt'; load 'Beta.txt'; load 'ny.txt'; H1(:,:,1)=eta; H1(:,:,2)=Beta; u1=ny; load 'eta2.txt'; load 'Beta2.txt'; load 'ny2.txt'; H2(:,:,1)=eta2; H2(:,:,2)=Beta2; u2=ny2; for i=1:n apriori(3)=range.P0; system.b=range.b0 + apriori(3)*randn; apriori(2)=range.b0 + apriori(3)*randn; 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,size(H1,1)+2); losses(1,i)=rizeni(H1,u1,system,apriori,seed); % losses(2,i)=rizeni(H2,u2,system,apriori,seed); end end