Extend your MATLAB code which you wrote last session to solve (1).
![]() |
(15) |
T = 1; % final time t = 0; % current time k = 0.05; % time step while t < T xi = (M + k * A) \ (M * xi); t = t + k; U = zeros(N+1,1); U(2:N+1) = xi; plot(x,U) pause(0.1) endTo get a nicer looking animation of the solution you might want to check out the command axis.
![]() |
(16) |