exercise12.m

% Loesung von Aufgabe 12
x0 = [5000 0];     % Anfangswerte
tmax = 70;     

% Loesung der drei DGLs
[tf, xf] = ode45(@freifall, [0 tmax], x0);
[tl, xl] = ode45(@laminar, [0 tmax], x0);
[tt, xt] = ode45(@turbulent, [0 tmax], x0);

plot(tf, xf(:,1), tl, xl(:,1), tt, xt(:,1));
legend('frei', 'laminar', 'turbulent', 'Location', 'Best');
title('Bahn bei freiem Fall mit Reibung');
xlabel('t [s]');
ylabel('x(t) [m]');

figure
plot(tf, xf(:,2), tl, xl(:,2), tt, xt(:,2));
legend('frei', 'laminar', 'turbulent', 'Location', 'Best');
title('Geschwindigkeit bei freiem Fall mit Reibung');
xlabel('t [s]');
ylabel('v(t) [m/s]');