clear all a = 0; b = 10; n =100; g = -9.81; c1 = g; h = (b-a)/n; x = a:h:b; x0 = [0;1]; y0 = [0;1]; f1 = @hang; f2 = @fkt; y1 = Ableitung (f1, c1, y0, a, b, n); winkel = atan (y1); c2 = [g, winkel]; figure (1) clf hold on plot (x,y1) plot (x,winkel) legend ('Ableitung', 'Alpha'); [X1, Y1] = RungekuttaS(f2, c2, y0, a, b, n); figure(2) clf hold on plot (X1,Y1)