%--------------------------------------------------------
%Simulationsaufgabe: Pfeil & Bogen
%--------------------------------------------------------

open_system('pfeil_und_bogen');

sim('pfeil_und_bogen', [0,20]);

figure
plot3(sx, sy, sz, 'LineWidth', 2)
grid on
hold on
plot3(Ziel_x, Ziel_y, Ziel_z, 'r+')
xlabel('x')
ylabel('y')
zlabel('z')
title('Flugbahn')
axis([-0,600, -100,100 -2,400])


figure
subplot(2,2,1)
plot(sx,sy);
xlabel('x[m]');
ylabel('y[m]');
title('x-y-Ebene');
grid on

subplot(2,2,2)
plot(sx,sz);
xlabel('x[m]');
ylabel('z[m]');
title('x-z-Ebene');
grid on

subplot(2,2,3)
plot(sy,sz);
xlabel('y[m]');
ylabel('z[m]');
title('y-z-Ebene');
grid on

subplot(2,2,4)
plot(tout,sz);
xlabel('t[s]');
ylabel('z[m]');
title('z(t)');
grid on



