RIDGETRIM is the jRidges module of jLab.

 RIDGETRIM  Trim edge effect regions from wavelet ridges.
    Wavelet ridges, such as those computed by RIDGEWALK, are generally 
    contaminated by edge effects at both ends.  In these locations, the
    ridges give biased estimates of the signal properties. 
    FRO=RIDGETRIM(P,RHO,FR), where P=SQRT(BETA*GAMMA) and FR is a column
    vector of frequencies from the ridge analysis, removes RHO*P/pi
    periods from the beginning and end of each ridge.  Ridges containing
    less than two points after this trimming are removed.
    Note that P=SQRT(BETA*GAMMA) is characterizes the generalized Morse 
    wavelet used in the wavelet transform.
    P/pi is approximately the number of oscillations within the central
    window of the wavelet, see eqn. (37) of Lilly and Olhede (2009).
    The choice RHO=1 thus corresponds to trimming one wavelet half-width 
    from end.  Numerical experiments show RHO=1 is a good value, but this
    depends somewhat on the values of GAMMA and BETA chosen.
    For joint ridges for multivariate signals FR should be a column vector 
    of the joint instantaneous frequency.  This is formed from the array FR
    output by RIDGEWALK by the weighted average FR=VMEAN(FR,1,ABS(WR).^2).
    RIDGETRIM(DT,P,RHO,FR) specifies that FR has been computed with the
    sample rate DT.
    [FRO,X1O,X2O,...,XNO]=RIDGETRIM(P,RHO,FR,X1,X2,...,XN), where the XN
    are any other ridge quantities, trims these in the same way as FR. The
    XN are arrays having the same number of rows as FR.  
    See also RIDGEWALK.
    'ridgetrim --f' generates a sample figure.
    Usage: fr=ridgetrim(P,rho,fr);
    This is part of JLAB --- type 'help jlab' for more information
    (C) 2018 J.M. Lilly --- type 'help jlab_license' for details

contents | allhelp | index