The Wavelet Digest Homepage
Return to the homepage
Search the complete Wavelet Digest database
Help about the Wavelet Digest mailing list
About the Wavelet Digest
The Digest The Community
 Latest Issue  Back Issues  Events  Gallery
The Wavelet Digest
   -> Volume 4, Issue 11

Answer: Use of Numerical Recipes software (WD 4.9 #10)
images/spacer.gifimages/spacer.gif Reply into Digest
Previous :: Next  
Author Message

PostPosted: Fri Dec 06, 2002 9:36 am    
Subject: Answer: Use of Numerical Recipes software (WD 4.9 #10)
Reply with quote

Answer: Use of Numerical Recipes software (WD 4.9 #10)

SUBROUTINE wt1tfa(a,n,aa,nmax,log_2n,wtstep) !Time/frequency analysis
!using Numerical Recipes wt1 by Press et al. (Cambridge, 2nd edition).
!This code by Aime' Fournier (
EXTERNAL wtstep !Requires n=2**log_2n.
REAL a(n) !Input signal becomes wavelet coefficient vector.
REAL aa(nmax,log_2n-1) !Output aa(.,j)=projection onto level j space.
CALL wt1(a,n,1,wtstep) !CALL pwtset before wt1tfa.
DO j=1,log_2n-1 !loop over timescales 2^j.
ncfcts=n/2**j !# coefficients at level j.
DO k=1,n !loop over time instants k.
IF ((ncfcts.LT.k).AND.(k.LE.2*ncfcts))THEN
aa(k,j)=a(k) !Keep only level j coefficients.
ELSE !mask coefficients corresponding other j levels:
CALL wt1(aa(1,j),n,-1,wtstep) !Projection onto level j space.
END DO !The value aa(k,j) now corresponds to amplitude at time k
RETURN !and timescale 2^j.
All times are GMT + 1 Hour
Page 1 of 1

Jump to: 

disclaimer -
Powered by phpBB

This page was created in 0.024672 seconds : 18 queries executed : GZIP compression disabled