function WPACKET, d,b,n ;+ ; NAME: ; WPACKET ; ; PURPOSE: ; This function performs packet table indexing. ; ; CATEGORY: ; Wavelets. ; ; CALLING SEQUENCE: ; p = WPACKET(d,b,n) ; ; INPUTS: ; d = depth of splitting in packet decomposition ; b = block index among 2^d possibilities at depth d ; n = length of signal ; ; OUTPUTS: ; p = linear indices of all coeff's in that block ; ; MODIFICATION HISTORY: ; Written by: Amara Graps August, 1995 ;Translated from MatLab Wavelab routine: packet.m ;- npack = 2^d aa = (b * (n/npack) + 1) ;Index of first element cc = ((b+1)*n/npack ) ;index of last element bb = 1 p = WMKIARRY( aa, bb, cc) ; ; Algorithm Source: WaveLab Version 0.600 ; WaveLab WWW site: http://playfair.stanford.edu/ ; WaveLab Questions? e-mail wavelab@playfair.stanford.edu ; RETURN, p END ;***************************************************