function res=percorretwa() #percorretwa.m - run over all the recordes and call "procuraralternons.m " for each lead, for each record #Copyright (C) 2008 Rui Rodrigues #This software is released under the terms of the GNU General Public License (http://www.gnu.org/copyleft/gpl.html) %comprimento do ecg a considerar para procurar alternancia NUMbatidas=64 res=zeros(0,0,0); for i=0:9 for j=0:9 num=strcat(int2str(i),int2str(j)) file1=strcat(strcat("../twadb/twa",num),".txt"); sinal=load(file1); %"sinal" file2=strcat(strcat("../twadb/twa",num),"_batidas.txt"); batidas=load(file2); %"batidas" [l n]=size(sinal); #n-1 é o numero de leads do ecg for k=2:n sinal1=sinal(:,k); [valores inicios]=procuraralternons(sinal1,batidas,500,NUMbatidas); if (length(valores)>0) res=[res;i*10+j,k,max(valores)]; max(valores) endif fflush(stdout); endfor fflush(stdout); endfor endfor endfunction