Extracting a signal with highest peak values
2 次查看(过去 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!