clear all; 
close all;

% where we solve
a = 
b = 
% final time
T = 

% spatial step
n = 
h = (b-a)/n;

% time step
m = 
k = T/m;

% grid
u = zeros(m+1,n+1);
x = a:h:b ;
t = (0:k:T)' ;

% IC
u(1,:) = 

% initialization of the system of linear equations
A = zeros(n+1, n+1); % matrix of the system
rhs = zeros(n+1, 1 ); % right hand side

for j = 1:m
    
      A(1,1) = 
      A(1,2) = 
      % ?????? (or other nonzero elements in the 1st row)
      rhs(1) = 
      for i = 2:n
        A(i, i-1)  = 
	    A(i, i)  = 
	    A(i, i+1)  = 
        % ?????? (or other nonzero elements in the i-th row)        
        rhs(i) = u(j,i);
      end
      A(n+1,n) = 
      A(n+1,n+1) = 
       % ?????? (or other nonzero elements in the (n+1)-th row)
      rhs(n+1) =
      
      u(j+1,:) = A\rhs';
end

figure;
surf(x,t,u);
shading interp;
colorbar;
xlabel('x');
ylabel('t');
zlabel('u(x,t)');

