【发布时间】:2016-05-24 16:02:07
【问题描述】:
我是 Matlab 的新手,我正在尝试从包含多个心跳的 .wav 文件中提取单个心跳。我已经设法显示整个 .wav 文件,但我不知道如何检测心跳,尤其是绘制它。这就是我所做的:
[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还自带例子:mathworks.com/help/dsp/examples/…
标签: matlab