Related to calculate average within particular range of graph
2 views (last 30 days)
Show older comments
Preshit Limje
on 18 Sep 2019
Commented: Star Strider
on 18 Sep 2019
Hello,
I am new to matlab. I got signals from the sensors for force with respect to time. The values of time and force are stored in respetive columns after importing it in matlab through excel file. Thus, I need to find the average values within particular range of values in graph (highlighted in red colour). Can someone help?
Thanks
Preshit
0 Comments
Accepted Answer
Star Strider
on 18 Sep 2019
Use the negative of your signal (essentially flipping it upside-down) so the sharp dips are now peaks. Then use either findpeaks or islocalmax to isolate the indices of the peaks. Use those indices to calculate the mean between them. (If I had your signal, I could write code specific to your problem. With only a picture, I can only describe the approach.)
4 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!