TWAnalyser - A T-wave Alternans Detector 1.0.0
(548 bytes)
function arr = TWAUpdateArray(arr, beats)
% TWAUpdateArray.m
% Author: Alexander Khaustov; alexander dot khaustov at gmail dot com
% Copyright (C) 2008 St.-Petersburg Institute of Cardiological Technics (Incart), www.incart.ru
% This software is released under the terms of the GNU General
% Public License (http://www.gnu.org/copyleft/gpl.html).
%
% Adjust array length for TWA SM analysis
l = length(arr);
if (l < beats)
arr(l + 1 : 2 : beats) = arr(l - 1);
arr(l + 2 : 2 : beats) = arr(l);
end;
return;