 + s) * u(jj, 1 : M - 1) + <span class="keyword">...</span>
        (1 - 2 * r) * u(jj, 2 : M) + <span class="keyword">...</span>
        (r - s) * u(jj, 3 : M + 1);
    d(1) = d(1) + (r + s) * 0;
    d(end) = d(end) + (r - s) * 0;
    u(jj + 1, 2 : end - 1) = thomas_algo(va, vb, vc, u(jj, 2 : end - 1))';
<span class="keyword">end</span>
u_slice_2 = u(round(0.9 / dt) + 1, :);
u_slice_2 = u_slice_1(:);
figure; hold <span class="string">on</span>;
title(sprintf(<span class="string">'t = %.2f'</span>, 0.9));
p