%Skript zur Integration eines Beschleunigungssignals
clear all
close all
clc
%% Plotten des Beschleunigungssignals
load('a_und_t.mat');

figure;
hold on
grid on
plot(t,a,'k');
%Variable a hat die Einheit g
title('Beschleunigungssignal');
ylabel('a in m/s^2');
xlabel('t in s');
hold off

%% Integration des Beschleunigungssignals

v=cumtrapz(t,a);    %v = Geschwindigkeit
figure;
hold on
grid on
title('Geschwindigkeit')
plot(t,v,'k');
ylabel('v in m/s');
xlabel('t in s');
hold off

%% Integration des Geschwindigkeitssignals

z=cumtrapz(t,v);    %z = Weg
figure;
hold on
grid on
title('Vertikalbewegung')
plot(t,z,'k');
ylabel('z in m');
xlabel('t in s');
hold off


