Extracting a signal with highest peak values
조회 수: 1 (최근 30일)
이전 댓글 표시
As shown in the image, I have two signals, one is smaller (blue) and the other is a bigger (red). I found the max peaks for both, and then set a conditional statement to find only peaks of the bigger red signal. Now I was to get rid of this signal entirely, so I only have the blue signal left. How do i do this?
Here's my code
n = length(val);
Ts = 1000;
t = (0:n-1)*Ts;
plot(t, val);
xlabel('Time(seconds)')
ylabel('Amplitude (mVolts)')
title('ECG Signal')
axis tight
hold on
[pk, loc] = findpeaks(val,t);
plot(t, val, loc, pk, 'o')
figure()
n = length(val);
Ts = 1000;
t = (0:n-1)*Ts;
plot(t, val);
xlabel('Time(seconds)')
ylabel('Amplitude (mVolts)')
title('ECG Signal')
axis tight
hold on
minValue = min(val);
val(val < 50) = minValue;
[pk, loc] = findpeaks(val,t);
plot(t, val, loc, pk, 'o')
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!