function [x,res,t]=Burger_analytique(model)
dx=2*model.xmax/(model.nPt-1);
dt=model.courant*dx;
t=(1:model.ntemps)*dt;
alpha=model.viscosite;
i=2:(model.nPt-1);

[x,u]=conditions_initialles(model.xmax, model.nPt);
res=zeros(model.ntemps, model.nPt);

r=sqrt(1./(4*t*alpha));
pp=sqrt(pi*t*alpha);



for i=1:model.ntemps
   

    xb=-x*r(i);
    xa=(x-t(i))*r(i);

    exa=erfc(xa);
    exb=erfc(xb);

    dum=0.5*(x-0.5*t(i))/alpha;
    sumc=exp(dum);
    res(i,:) = exa./(exa+exp(dum).*exb); 
    
end








