WTCENTER Calculates the delay of filters for alignment. WTCENTER (X) calculates the integer aproximation of delay for filter X using the method set with the WTMETHOD function, for alignment operations in Wavelet transforms. For a non integer value, use the CENTER function. See also: WTMETHOD, CENTER, WT
0001 function d=wtcenter(x,op); 0002 0003 % WTCENTER Calculates the delay of filters for alignment. 0004 % 0005 % WTCENTER (X) calculates the integer aproximation 0006 % of delay for filter X using the method set with 0007 % the WTMETHOD function, for alignment operations 0008 % in Wavelet transforms. 0009 % 0010 % For a non integer value, use the CENTER function. 0011 % 0012 % See also: WTMETHOD, CENTER, WT 0013 % 0014 0015 %-------------------------------------------------------- 0016 % Copyright (C) 1994, 1995, 1996, by Universidad de Vigo 0017 % 0018 % 0019 % Uvi_Wave is free software; you can redistribute it and/or modify it 0020 % under the terms of the GNU General Public License as published by the 0021 % Free Software Foundation; either version 2, or (at your option) any 0022 % later version. 0023 % 0024 % Uvi_Wave is distributed in the hope that it will be useful, but WITHOUT 0025 % ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0026 % FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0027 % for more details. 0028 % 0029 % You should have received a copy of the GNU General Public License 0030 % along with Uvi_Wave; see the file COPYING. If not, write to the Free 0031 % Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 0032 % 0033 % Author: Sergio J. Garcia Galan 0034 % e-mail: Uvi_Wave@tsc.uvigo.es 0035 %-------------------------------------------------------- 0036 0037 global WTCENTERMETHOD 0038 0039 if size(WTCENTERMETHOD)==[0,0] 0040 WTCENTERMETHOD=0; 0041 end 0042 0043 if WTCENTERMETHOD>3 | WTCENTERMETHOD<0 0044 WTCENTERMETHOD=0 0045 end 0046 0047 d=floor(center(x,WTCENTERMETHOD)); 0048 0049 % (Another long function !!!) 0050