MATLAB: Ground motion velocity in matlab

accelerogram

I have ground acceleration and i want to calculate the velocity of the accelerogram, how can i do that in matlab?

Best Answer

if you have the acceleration vector , you can integrate it to get the velocity, here is a simple example :
t=0:0.1:2; % time
a=2*t; % linear acceleration
v=integral(a,0.2); % velocity
plot(a), hold on, plot(v,'r')