function features=findQRSRelatedFeatures(yp,QRS,QRS1,QRS2,QRS3,QRS4,QRS5)
len=length(yp);
peakMag=yp(QRS);
val=std(peakMag);
llp=median(diff(QRS));
vala=std(diff(QRS));
valb=vala/llp;
valc=moment(diff(QRS),3);
if isnan(val)==1
    val=0;llp=0;vala=0;valb=0;valc=0;
end

features=[val,llp,vala,valb,valc];

peakMag=yp(QRS1);
val=std(peakMag);
llp=median(diff(QRS1));
vala=std(diff(QRS1));
valb=vala/llp;
valc=moment(diff(QRS1),3);
if isnan(val)==1
    val=0;llp=0;vala=0;valb=0;valc=0;
end

features=[features,val,llp,vala,valb,valc];

peakMag=yp(round(len/3)+QRS2);
val=std(peakMag);
llp=median(diff(round(len/3)-1+QRS2));
vala=std(diff(round(len/3)-1+QRS2));
valb=vala/llp;
valc=moment(diff(QRS2),3);
if isnan(val)==1
    val=0;llp=0;vala=0;valb=0;valc=0;
end

features=[features,val,llp,vala,valb,valc];


peakMag=yp(round(2*len/3)-1+QRS3);
val=std(peakMag);
llp=median(diff(round(2*len/3)-1+QRS3));
vala=std(diff(round(2*len/3)-1+QRS3));
valb=vala/llp;
valc=moment(diff(QRS3),3);
if isnan(val)==1
    val=0;llp=0;vala=0;valb=0;valc=0;
end

features=[features,val,llp,vala,valb,valc];


peakMag=yp(round(QRS4));
val=std(peakMag);
llp=median(diff(QRS4));
vala=std(diff(QRS4));
valb=vala/llp;
valc=moment(diff(QRS4),3);
if isnan(val)==1
    val=0;llp=0;vala=0;valb=0;valc=0;
end

features=[features,val,llp,vala,valb,valc];


% peakMag=yp(round(len/2)-1+QRS5);
peakMag=yp(QRS5);
val=std(peakMag);
llp=median(diff(round(len/2)-1+QRS5));
vala=std(diff(round(len/2)-1+QRS5));
valb=vala/llp;
valc=moment(diff(QRS5),3);
if isnan(val)==1
    val=0;llp=0;vala=0;valb=0;valc=0;
end

features=[features,val,llp,vala,valb,valc];