function [outD,outI,outR]=voting_analysis_growth(D,I,R,DD,DI,DR,ID,II,IR,RD,RI,RR,g,length)

outD=zeros(1,length);
outI=zeros(1,length);
outR=zeros(1,length);

outD(1)=D;
outI(1)=I;
outR(1)=R;

for i =1:length
    outD(i+1)=(DD+g)*outD(i)+ID*outI(i)+RD*outR(i);
    outI(i+1)=DI*outD(i)+(II+g)*outI(i)+RI*outR(i);
    outR(i+1)=DR*outD(i)+IR*outI(i)+(RR+g)*outR(i);
end
