File Exchange

image thumbnail


Open source software for strong ground motion data processing


Updated 13 Aug 2019

View License

OpenSeismoMatlab can calculate the following strong motion data processing output: (1) Time histories of acceleration, velocity and displacement, with or without baseline correction, (2) Resampled time histories of acceleration, velocity and displacement with modified time step size, (3) Peak ground acceleration, velocity and displacement (PGA, PGV, PGD), (4) Total cumulative energy and its normalized time history, (5) Significant duration according to Trifunac & Brady (1975), (6) Arias intensity, (7) Linear elastic response spectra, (8) Constant ductility inelastic response spectra, (9) Fourier amplitude spectrum, (10) Mean period (Tm)

Cite As

George Papazafeiropoulos (2020). OpenSeismoMatlab (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (16)

@Ming Yin Samson LAU:
Thank you for your interest in this submission. Let me know if you have any other issues!!!

Hi sorry seems i figured out what's the problem
i did not download the el dat file and put it under the same path so the file could not be opened
thanks you for your work, you help a lot for my paper

Hi i am a new user to matlab since i was doing my jornal paper on ground motion selection and scling
After downloading your add-on i tried to use it inside matlab,
while i copy your first few script on load earthquake data, it shows
Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.
Am i doing anything wrong? Please help me

@ michele paoletti: The code has been updated so that this issue is resolved. Thank you for your suggestions and apologies for the delayed response.

Thanks for answer George. td is considered as time duration of the seismic wave. For example if we use definition of Trifunac duration td is the time where the energy go from 5% to 95% of the total energy. Reducing time duration respect your formula we take in account only energy of the wave and not the noise energy (although very low) that is present first and then the seismic wave. The result obtained is a slightly lower value respect your formula. I'd like to know what you think about.

OpenSeismoMatlab calculates the Arias intensity in the whole time duration of the input earthquake acceleration time history. This is the reason for which there are not any limits in the code segment. What do you mean by td?

Hi, Arias Intensity must be calculated in the interval from 0 to td, while this line code that you post not have this limit:
aint2 = cumsum(A.^2)*pi*dt/(2*g);

Thank you very much Ricardo A. The code has been fixed and enhanced based on your comments. You can now download the latest version. Regards!

Ricardo A.

2 errors:
line 188 should be: seismic.vel = cumtrapz(time,xgtt);
line 190 should be: seismic.disp = cumtrapz(time,seismic.vel);
previously, the velocity was multiplied by an extra 'dt' and the displacement by an extra 'dt^2'. Thanks for your work!

Ricardo A.

Also, maybe you can add these 2 parameters calculations:
fi = f(f>0.25 & f<20);
Ci = U(f>0.25 & f<20);
Fm = ((Ci(:)'.^2)*(fi(:)))/(Ci(:)'*Ci(:));
seismic.Fm = Fm;

for i=1:length(seismic.PSa);
if seismic.PSa(i)>maxi



Calculation of Arias intensity and significant duration are corrected. Minor updates at the help section of the main routine OpenSeismoMatlab.m


Baseline correction enhanced
Bug related to the cumulative trapezoidal numerical integration of the uncorrected ground motion is fixed.
Additional output related to earthquake input energy and predominant PSa and period is given by the algorithm


Screenshot updated


Resampling capability added for increasing or decreasing the size of the time step of the input acceleration time history.


Baseline correction added

Code improved

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: ArtifSeismoMatlab