function [xtr,NB_TR]=trame(x,TRAME,R) % appel : [xtr,NB_TR]=trame(x,TRAME,R) % structuration de la zone selectionnee x en NB_TR (calculé) trames % de TRAME (choisi) points avec un recouvrement de R(choisi) points % entre trames successives % % modif Thu Mar 28 15:19:14 CET 2002 % adding ALLOCATION of the matrix a-priori ! NB_TR=fix((length(x)-TRAME)/(TRAME-R)+1); [l,c]=size(x); if(l>c) x=x'; end % jan adds: xtr = zeros(TRAME,NB_TR); if (NB_TR ~= 0) for tr=1:NB_TR xtr(:,tr)= x(1+(tr-1)*(TRAME-R):tr*(TRAME-R)+R)'; end else disp(' zone sélectionnée trop petite par rapport à la trame demandée') end