我已经绘制了图表,并且我得到了一些代码在这里
fs = 100; %freq 100hz
N = length(pbcg); %data length, before that do a pbcg=load('pbcg.txt')
duration_in_seconds = N/fs;
duration_in_minutes = duration_in_seconds/60;
BPM_avg = beat_count/duration_in_minutes;
fid = fopen('y1.txt','a'); %txt naming and append
%count the dominant peaks in the signal
for k = 2 : length(pbcg)-1
if (pbcg(k) > pbcg(k-1) && pbcg(k) > pbcg(k+1) && pbcg(k) > 1)
beat_count = beat_count + 1;
end
fprintf(fid, 'x_axis%i\t ', k); %open writer
fprintf(fid, 'BPM%i\n ', BPM_avg); %open writer
end
disp(BPM_avg); %display the BPM
fclose(fid); %close writer
绘制图的图像在这里(没有插入 img 的声誉)... https://skydrive.live.com/embed?cid=0525DA685954952E&resid=525DA685954952E%21407&authkey=ALmvTzzQ7Xer2Do
我想知道的是,正如您所见,最高点有 11 个峰值,我如何获得峰值本身的“价值”?正如我想知道如何获得 y 轴值或计算值。