
T0 = 1;
kappa = 1/12;

n = 20;
xs = [0:1/n:1];
Tinit = [T0, zeros(1, n - 1), T0];

% Verschiedene t

s = 5/12;
tmax = 0.05;
steps = tmax * kappa / s / (1/n)^2;
figure(1)
plot(xs, wleit2(Tinit, s, steps), ...
     xs, wleit2(Tinit, s, 2*steps), ...
     xs, wleit2(Tinit, s, 4*steps), ...
     xs, wleit2(Tinit, s, 8*steps));
legend('t = 0.05', 't = 0.1', 't = 0.2', 't = 0.4')
xlabel('x')
ylabel('T')

% Verschiedene s
tmax = 0.4;

s = 1/24;
steps = tmax * kappa / s / (1/n)^2;
T1 = wleit2(Tinit, s, steps);
s = 1/6;
steps = tmax * kappa / s / (1/n)^2;
T2 = wleit2(Tinit, s, steps);
s = 5/12;
steps = tmax * kappa / s / (1/n)^2;
T3 = wleit2(Tinit, s, steps);

figure(2)
plot(xs, T1, '-*', xs, T2, '-o', xs, T3, '-s')
legend('s = 1/24', 's = 1/6', 's = 5/12')
xlabel('x')
ylabel('T')
