File Exchange

image thumbnail

Pseudo spectral acceleration, velocity and displacement spectra

version 2.0 (98.4 KB) by

This is a MatLAB function to compute linear-elastic damped response spectrum of time series

4 Ratings



View License

The function generates pseudo-spectral acceleration (PSA), pseudo-spectral velocity (PSV) and spectral displacement (SD) spectra for given damping ratio (e.g., 5% of critical). Spectral ordinates are for linear-elastic single-degree-of-freedom system with unit mass. A clear example is provided in demo.m file in zipped folder. Also provided is a plotting function for PSA, PSV and SD spectra.

Comments and Ratings (11)

Thans Dr. Erol

The code has the proper citation to a solver used.

jim junker

This file is copied from a Caltech report. Plagiarism!

Thanks a lot for your prompt answer Dr Kalkan!

That's correct. For example, xi = 0.05 for 5% of critical damping.

Hello Dr. Kalkan, just a question on the parameter xi (mentioned as "critical damping" in your comment): is this the fraction with respect to the critical damping ? i.e. 0.01 = 1% of critical damping (zero overshoot) ?

Thanks a lot for your useful function and Best Regards.

If you call the function as [PSA, PSV, SD] = responseSpectra(xi, sPeriod, gacc, dt), It will produce PSA, PSV and SD as separate arrays.

Thanks Mimo, I will make the changes per your suggestion. I do have MatLAB code to generate inelastic spectrum as well. I will post that one as well.


Mimo (view profile)

Thanks for this code Dr Kalkan. I am just curios if you have also developed any code for inelastic response?
Also the current code prints the ans (which is PSA) after running the it doesn't crate any vector for plotting. Is it possible for you to modify it to produce PSA, PSV and SD vectors separately?

First time, I haven't seen this error. The function has been fully tested in MatLAB version 2013a. Were you able to generate get the results? If you e-mail me your input waveform, I can check it.


Thanks for the function. I receive the following warning though:
Warning: Matrix is singular to working precision

Have you seen this before?



An example is added in demo.m file
A new plotting function is added


Description updated.


Note section has been revised.


Picture added

MATLAB Release
MATLAB 8.1 (R2013a)

Inspired by: An improved subplot function

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video