"$t = 0.9$"></p><pre class="codeinput">plotSlice_2_6_3( 0.9, dt, u, x_ );
u_slice_1 = u(round(0.9 / dt) + 1, :);
u_slice_1 = u_slice_1(:);
dt = 0.1; T = round(1 / dt); N = t * T;
r = nu * dt / dx / dx;
s = a * dt / dx / 2;
t_ = 0 : dt : t;
[X_, T_] = meshgrid(x_, t_);
f = f_(x_);
u = zeros(size(X_));
u(1, :) = f;
u(:, 1) = 0; u(:, M + 1) = 0;

va = (-r + s) * ones(1, M - 2);
vc = (-r - s) * ones(1, M - 2);
vb = bsxfun(@plus, ones(1, M - 1), r * 2);

<span class="keyword">for</span> jj = 1 : N - 1
    d = (r