The main program is the one in the file "percorretwa.m" and is an octave (clone of matlab) programe that is called without arguments, "percorretwa()". It will produce for each lead, in each ecg of twa database,an estimate of alternons magnitude. For each record the result chosen is the one of the lead with maximum magnitude. To run the program "percorretwa" there must be a set of text files with the data from twadatabase in the folowing location and produced in the folowing way: -The path to the "twadb" directory ,from the directory where "percorretwa.m" and the acompaining files are, must be (in linux) "../twadb/". -Inside twadb must be for each record XY a file twaXY.txt and a file twaXY_batidas.txt. -The file twaXY.txt is produced by the instruction: rdsamp -r twadb/twaXY > twaXY.txt -The file twaXY_batidas.txt is produced by the instruction: ihr -r twadb/twaXY -a atr -i -v>twaXY_batidas.txt -As it is (although it's easy to change), to run "percorretwa" all the 100-files (x2) twaXY.txt and twaXY_batidas.txt should be in the twadb directory.