필터 지우기
필터 지우기

Peak Base width of a moving object

조회 수: 3 (최근 30일)
siri meka
siri meka 2021년 11월 22일
편집: Image Analyst 2021년 11월 22일
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