seperating higher and lower levels of a pulse

조회 수: 3 (최근 30일)
SHANTANU KSHIRSAGAR
SHANTANU KSHIRSAGAR 2020년 4월 1일
댓글: SHANTANU KSHIRSAGAR 2020년 4월 4일
I have data which contains pulses with large number of ripples. How do i identify the maximum(mean) and minimum(mean) of each pulse. Also the data varies in pulsewidth in other data i have(not attached).
I searched and got statelevels which could be used , but i do not have the signal processing toolbox and need to find it mathematically and accurately.

답변 (1개)

Image Analyst
Image Analyst 2020년 4월 1일
Please post a screenshot (a PNG file - it's easier for us to see immediately without saving your fig and then moving over to MATLAB to open it and then view it.)
Not having see it, I guess I'd first suggest thresholding. If the signal is above some value, it's the top of the pulse and if it's below the value, it's the bottom of the pulse train.
threshold = mean([min(pulseTrain), max(pulseTrain)]); % Half way between min and max.
pulseTopIndexes = pulseTrain > threshold;
% Get the overall min and max of the pulse tops.
maxPulseTop = max(pulseTrain(pulseTopIndexes));
minPulseTop = min(pulseTrain(pulseTopIndexes));
If you need the min and max of each individual pulse separately, then you'll have to label each pulse and examine it. The easiest way to do that is to use the Image Processing Toolbox (untested code)
props = regionprops(pulseTopIndexes, 'PixelValues');
for k = 1 : length(props)
maxPulseTop(k) = max(props(k).PixelValues);
minPulseTop(k) = min(props(k).PixelValues);
end
  댓글 수: 7
Image Analyst
Image Analyst 2020년 4월 4일
You might try findchangepts() but you can see that where the pulse starts is not exactly a definitely place. Just look at the histogram. How about taking the max of the signal and just thresholding it at that minus 0.05? Then for each pulse, keep going from the starting point until the signal begins to turn around, and take the stats from there on.
SHANTANU KSHIRSAGAR
SHANTANU KSHIRSAGAR 2020년 4월 4일
I am trying the same, will be asking you if furthur doubt situation arrises during execution. Thank you supportiveness and corresponding solutions.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by