root/applications/dual/SIDP/Kopie (2) - finalni implementace/mc_study2.m @ 1183

Revision 1113, 0.9 kB (checked in by zimamiro, 14 years ago)
Line 
1function [m losses]=mc_study2(regulator_parameters,system,range,n,co,a)
2p=0;
3[H u]=load_H(co); 
4
5for i=1:n
6    apriori(3)=range.P0;
7    system.b=a*range.b0+ apriori(3)*randn;
8    apriori(2)=range.b0;
9    apriori(1)=range.y0;
10    while (system.b==0)
11        system.b=range.b0 + apriori(3)*randn;
12    end
13    seed=randn(1,regulator_parameters.horizont);
14    j=1;
15    losses(j,i)=cc(regulator_parameters,system,apriori,seed);j=j+1;
16    %losses(j,i)=ps(regulator_parameters,system,apriori,seed);j=j+1;
17    losses(j,i)=rizeni(H,u,system,apriori,seed);j=j+1;
18    %losses(j,i)=triv(regulator_parameters,system,apriori,seed);j=j+1;
19    losses(j,i)=alstr(regulator_parameters,system,apriori,seed);j=j+1;
20   
21end
22%losses=min(losses,10);
23if p==1
24    for i=1:size(losses,1)
25        figure   
26        hist(min(losses(i,:),10),100);    AXIS([0 10 0 200]);   TITLE([median(losses(i,:)) mean(losses(i,:))])
27    end
28end
29m=mean(losses,2);
30end
Note: See TracBrowser for help on using the browser.