function [Q_peaks1 R_peaks1 S_peaks1] = remove_rep (Q_peaks, R_peaks, S_peaks) % new_X = remove_rep(Dif,X) % % Input Variables % Q_peaks - The new Q peaks % R_peaks - The new R peaks % S_peaks - The new S peaks % Output Variables % Q_peaks1- The new Q peaks % R_peaks1- The new R peaks % S_peaks1- The new S peaks % % Description % reomves repeated QRS peaks in the vector containing each of them. % Created % 8/23/2006, Mohamed A Mneimneh, Marquette University % % This software is released under the terms of the GNU General % Public License (http://www.gnu.org/copyleft/gpl.html). % Modified count = 1; Q_peaks1(count) = Q_peaks(1); R_peaks1(count) = R_peaks(1); S_peaks1(count) = S_peaks(1); count = count + 1; for i = 2:length(Q_peaks) if (Q_peaks(i) ~= Q_peaks(i-1)) Q_peaks1(count) = Q_peaks(i); R_peaks1(count) = R_peaks(i); S_peaks1(count) = S_peaks(i); count = count + 1; end end