Linear Convection with varying grid size
Objective: %% Main code... % 1 d linear convection matlab function % % function % arguments passed in the function % n is number of grids and f is the number of figure function xdot = linear_convection(n) % Inputs for the linear convention L=1; c=1; dt =0.01; t_end = 0.4; nt = (0.01:dt:t_end); x = linspace(0,L,n); dx =x(2)-x(1);…