Linear Convection
Objective: given condition length (l)= 1m velocity at all node is 1m/s except from dx point 0.1 to 0.3 to 2m/s c=1 time step dt=0.01 time t=0.4 number of time step =t/dt for different nodes with above boundary condition are compared case 1 where n=20 clear allclose allclcl=1n1=20c=1dt=0.01 %time stept=0.4 %time % calculationx1=linspace(0,l,n1)dx1=x1(2)-x1(1)%…