nx=11; % The number of spatial points. a=0; b=1; % Spatila domain. hx=(b-a)/(nx-1); % The spatial step size. x=a:hx:b; % Spatial vector. nt=2001; % The number of ...
% This code solve parabolic PDE of the form ut- alpha uxx=2. % This is Exercise 16 , section 12.2, page738. % This scheme is unconditionally stable. L = 1; % Length of the spatial domain. T = 1; % ...