Peak Base width of a moving object
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Image Analyst
il 22 Nov 2021
Modificato: Image Analyst
il 22 Nov 2021
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 Commenti
Vedere anche
Categorie
Scopri di più su Spectral Measurements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!