"Scott " <boofheadfenn@hotmail.com> wrote in message <i48shn$4oo$1@fred.mathworks.com>...
> Severity Index (SI) in mathematical form is:
> SI=(integrate from 0 to T) a(t)^2.5 dt
> where a(t) is acceleration history from 0<t<T
> Head Injury Criterion (HIC) in mathematical form is:
> HIC=max[(t2t1)[1/t2t1 * (integrate from t2 to t1) a(t) dt]^2.5]
> where t1 and t2 are two instants in time and the criteria chooses whichever t1 and t2 gives a max HIC.
>
> How do I write a general purpose routine in MATLab that can plot acceleration time history and calculate SI and HIC values for each impact from a set of data files?
         
If you have acceleration as a single vector for evenlyspaced times or a vector of acceleration values and along with associated times, to find SI you can use trapz with a single argument or two arguments, respectively, using a^2.5 as an integrand.
HIC is more difficult. For it you will need cumtrapz for a(t) as integrand. Then you need to construct a matrix of all possible combinations of t1 < t2 of the above quantity with zeros in the other elements. The integral values from various t1 to t2 can be obtained by appropriate differences from among the cumtrapz values. Then find the max of this matrix. Or instead of a matrix you could just use two nested forloops calculating the same quantities to develop a maximum.
The plotting I leave to you.
Roger Stafford
