Calculate relative values from peaks

3 次查看(过去 30 天)
Hi I'd like to know how to calculate relative values from one or several peaks. If I use an EMG signal, I need to know, peak value and previus concentric contration and next eccentric contracction as shows the image Can anybody help me? Thanks!
  2 个评论
Star Strider
Star Strider 2016-5-20
No image.
I doubt you can tell a concentric contraction from an eccentric contraction from the EMG alone. (I’ve not worked with EMGs in a while, and don’t know your experimental setup, so I would need your data to confirm this.)
To upload the image, use the brown-framed green landscape picture icon. Remember to complete both the ‘Choose file’ and ‘Insert image’ steps.

请先登录,再进行评论。

采纳的回答

Star Strider
Star Strider 2016-5-20
The easiest way to define your peaks and troughs of your signal is to use the Signal Processing Toolbox findpeaks function. Use it on your original signal to find the peaks, then use it in a separate call on the negative of your signal to define the troughs.
  8 个评论
Julio Martín
Julio Martín 2016-6-7
编辑:Julio Martín 2016-6-7
Hi again I’ve tried to do it and have some questions. When I calculate it I obtain two kind of values. One side, small values that seem to be as middle peaks of each side of mean peak. That happens if I write: [pks,idxp]=findpeaks(R(:,b),'npeaks',6); [trf,idxt]=findpeaks(-R(:,b),'npeaks',6); for idpx 51, 58, 61, 67, 69, 75, for idpt 54, 60, 64, 68, 72, 77, And on the other side, when if write: [pks,idxp]=findpeaks(R(:,b),'npeaks',6,'minpeakdistance',2000); [trf,idxt]=findpeaks(-R(:,b),'npeaks',6,'minpeakdistance',2000); for idpx 223, 2228, 4571, 7032, 9865, 12925, for idpt 538, 3486, 6045, 8854, 11543, 14233, have other value, that seems to be total area of every peak (don’t know if that’s right, but it’s a big value). Could you tell me what do you think? As I said I need peak value and relative value of both sides from it (image). If you want, I can send you by private mail the file data, so you can calculate it. Thanks
Star Strider
Star Strider 2016-6-7
You will get different results if your calls to findpeaks are different. You have to experiment to get the result you want.
It may be worthwhile for you to do a fft of your data to define the valid data and noise frequencies, then design a digital filter for your original data in that plot to eliminate some of the noise. Then do your findpeaks call on the filtered data.
There are several ways to design filters. My procedure is here: How to design a lowpass filter for ocean wave data in Matlab? You will have to decide whether you want a low-pass or band-pass filter, then experiment with the filter passband to get the result you want.
The problem is that your signal has so much noise that finding the peaks you want to use to define the concentric and eccentric contractions are going to be difficult without filtering it first. Give the filter idea a go and see if that improves your ability to identify the information you want.

请先登录,再进行评论。

更多回答(0 个)

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by