%~ findPattern.m - Part of the trqt package submitted for the 2006 CinC challenge %~ Copyright (C) 2006 DA Tironi, R Sassi and LT Mainardi %~ This software is released under the terms of the GNU General %~ Public License (http://www.gnu.org/copyleft/gpl.html). function [ind, c2] = findPattern(listaQT, minSizePattern) c2 = 1;%miglior famiglia ind = 0;%indice famiglia for c1 = 2:size(listaQT, 1) if(listaQT(c1, 1)==0 || c1==size(listaQT, 1)) if(c2 >= minSizePattern) ind = c1 - c2; if(listaQT(c1, 1)==1 && c1==size(listaQT, 1)) c2 = c2+1; end break end else c2 = c2+1; end end