
%imam varijablu testniGRC
  %broj trenutacnog testnog modela, GLEDAJ=1,GRC=2,IDEMGORI=3,NESTAJEZRAKA=4,OKRENISE=5,OPASNOST=6,SMIRISE=7,STANI=8
clear;
clc;
%broj_provjere=7;
load MGPistrenirano_nex100M5Q5;
load MGSistrenirano_nex100M5Q5;
load DPistrenirano_nex100Q5;
load DSistrenirano_nex100Q5;
load Testnipodatak;
postotakMGP=0;
postotakMGS=0;
postotakDP=0;
postotakDS=0;
postotakMGPtotal=zeros(1,8);
postotakMGStotal=zeros(1,8);
postotakDPtotal=zeros(1,8);
postotakDStotal=zeros(1,8);


for i= 1:100
    
    [numberMGP(i), logliknessMGP(i,:)]= MGPtestiranje (staniTESTNI{i}, priorMGP, transmatMGP, muMGP, sigmaMGP, mixmatMGP);
    
    
    postotakMGPtotal(numberMGP(i))=postotakMGPtotal(numberMGP(i))+1;
    
    [numberMGS(i), logliknessMGS(i,:)]= MGStestiranje (staniTESTNI{i}, priorMGS, transmatMGS, muMGS, sigmaMGS, mixmatMGS);
    
    
    postotakMGStotal(numberMGS(i))=postotakMGStotal(numberMGS(i))+1;
    
    [numberDP(i), logliknessDP(i,:)]= DPtestiranje (staniTESTNI{i}, priorDP, transmatDP, obsmatDP);
    
    postotakDPtotal(numberDP(i))=postotakDPtotal(numberDP(i))+1;
    
    [numberDS(i), logliknessDS(i,:)]= DStestiranje (staniTESTNI{i}, priorDS, transmatDS, obsmatDS);
%     if numberDS(i) == broj_provjere
%         
%         postotakDS=postotakDS+1;
%         
%     end
    postotakDStotal(numberDS(i))=postotakDStotal(numberDS(i))+1;
    
    
end

