Peak Base width of a moving object
4 ビュー (過去 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
0 件のコメント
回答 (1 件)
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)
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!