clear; recnr=1; %The record number should be entered here TWA_HeaderRead; %Reads the header file TWA_FileRead; TWA_Rdetect; %Detects the R-waves TWA_RespCancel; %Base line wandering cancelation TWA_TmatrixFormation; %Prepares T-wave matrix TWA_T_PCA; TWA_spektras; %Calculates final TWA criteria