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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/808594/image.jpeg)
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!