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

i=2:(model.nPt-1);

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

% for j=1:model.ntemps
% 	ud(1)=.5*(u(1)+u(2))-0.5*model.courant*(F(u,2)-F(u,1));
% 	ud(end)=u(end);
%     
% 	ud(i)=0.5*(u(i)+u(i+1))-0.5*model.courant*(F(u,i+1)-F(u,i));
%     
%     ud(i) = u(i) - model.courant*(F(ud,i)-F(ud,i-1))+s*(u(i-1) - 2*u(i) + u(i+1));
% 
% 	res(j,:)=ud;
% 	u=ud;
% end
for j=1:model.ntemps
	ud(1)=u(1);
	ud(end)=u(end);
    
	ud(i)=u(i) -0.5*model.courant*(F(u,i+1)-F(u,i-1))+0.25*model.courant^2*((u(i)+u(i+1)).*(F(u,i+1)-F(u,i))-(u(i-1)+u(i)).*(F(u,i)-F(u,i-1)))+s*(u(i-1) - 2*u(i) + u(i+1));
	res(j,:)=ud;
	u=ud;
end
