Peak Base width of a moving object

3 次查看(过去 30 天)
Hi,
So the graph i have attached is having movement data. x axis is time. i want the start time the movement started and the end time. i want to find the average time the object was moving before it rested.
TIA

回答(1 个)

Image Analyst
Image Analyst 2021-11-22
编辑:Image Analyst 2021-11-22
Try something like
inMotion = yourSignal > 0; % or some small number.
startingIndexes = strfind(inMotion, [0, 1]) + 1
endingIndexes = strfind(inMotion, [1, 0])
To get the average length of time you can subtract and call mean
meanTime = mean(endingIndexes - startingIndexes)

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

产品


版本

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by