You are on page 1of 1

clear all ; % hapus semua parameter Fs = 1000 ; % sampling data/signal [Hertz] dt = 1/Fs ; % sampling waktu [detik] k = 273; m = 0.

82; w = (sqrt(k/m)); % frekuensi t = 0 : 1/Fs : 1 ; % deret waktu % percepatan accelerometer [m/detik/detik] a = 41*sin(w*t) ; % sinyal percepatan % kecepatan = integral(percepatan) [m/detik] v = cumtrapz(a)*dt; % Jarak tempuh = integra( kecepatan) [m] s = cumtrapz(v)*dt; % Gambar grafik masing-masing data. figure(1) plot(t,a,'linewidth',2),grid xlabel('Waktu [detik]','fontsize',18) ylabel('Percepatan [m/detik^2]','fontsize',18) figure(2) plot(t,v,'linewidth',2),grid xlabel('Waktu [detik]','fontsize',18) ylabel('Kecepatan [m/detik]','fontsize',18) figure(3) plot(t,s,'linewidth',2),grid xlabel('Waktu [detik]','fontsize',18) ylabel('Jarak [m]','fontsize',18)

You might also like