I would like to embed below oscillation time formula in the logarithmic decrement formula where
I have a time vector time=[1x13094] and
osc = diff(time);
i have created a oscillation period vector osc=[1x13093] by substracting consecutive time elements.
Where y(t) are equal to peaks vector pks=[1x183] and pks vector coming from an accelaration vector acc=[1x13094] with findpeaks function:
Now, i want to use osc and pks vectors to calculate logarithmic decrement.
When i try this code i get a error message 'Array indices must be positive integers or logical values.' How can i overcome this error? Thank you in advance.