function trajectorie=simulizer(VitIn, HMM, Phi, Var, Mean)
if nargin<3
    Phi=squeeze(HMM.Phi(:,1,:));
    Var=HMM.Cov;
    Mean=HMM.mu;
else
end

    T=length(VitIn);
trajectorie=zeros(T,1);
trajectorie(1,1)=Mean(1)+0.01;
for i=2:T
    trajectorie(i,:)=log(Phi(VitIn(i)+1,1)*(Mean(VitIn(i)+1)+trajectorie(i-1,1))+mvnrnd(0,sqrt(Var(1,VitIn(i)+1))));
end;


