我是Matlab新手,我試圖從包含多個.wav文件的一個心跳中提取單個心跳。我已經設法顯示整個.wav文件,但我沒有找到如何檢測心跳,特別是繪製它。這就是我所做的:Beat Signal Plot Matlab
[y,fs] = audioread('myfile.wav');
y = y(:,1);
dt = 1/fs;
N = length(y);
t = linspace(0, N/fs, N);
plot(t,y); xlabel('Seconds'); ylabel('Amplitude');
threshold = 0.6;
if(max(y) > threshold) % Here I tried to dectect the first heartbeat but it doesn't work
plot(t1,y); % t1 should be the duration of one heartbeat
end
關於如何解決這個問題的任何想法?我試過這個,但我認爲它的Matlab版本有問題:http://labrosa.ee.columbia.edu/projects/beattrack/
搜索QRS檢測算法,matlab甚至附帶一個例子:http://www.mathworks.com/help/dsp/examples/real-time-ecg-qrs-detection.html – xvan