PERIODINDEX is the jRidges module of jLab.

 PERIODINDEX  Returns time index in increments of instantaneous period.
 
    INDEX=PERIODINDEX(DT,OMEGA,N) returns an index INDEX giving the start
    of every Nth cycle completed by the instantaneous frequency OMEGA.
 
    OMEGA is a column vector of instantaneous frequency in radians per unit 
    time as computed by INSTMOM. DT is the sample time, a scalar.  The
    units of 2*pi/OMEGA should be the same as the units of DT.
 
    For example, N=1 returns the start of every cycle, N=2 the start of 
    every second cycle, and N=0.5 the start of every half-cycle.
 
    When N does not fit evenly into the total number of cycles completed by
    OMEGA, the remainder is split evenly between the beginning and the end.
 
    If NaNs are found within OMEGA, this is interpreted as being separate
    ridges output by RIDGEWALK.  Then PERIODINDEX applies itself to each 
    cell separately and returns the result in one long array, with no NaNs.
 
    INDEX=PERIODINDEX(OMEGA,N) also works, with DT defaulting to unity.  In
    this case OMEGA must have units of radians per sample interval.
 
    [INDEX,BOOL]=PERIODINDEX(OMEGA,N) also returns a boolean array BOOL of
    the same size as OMEGA that is true at the locations given by INDEX,
    and false otherwise. 
 
    PERIODINDEX is useful with ELLIPSEPLOT for plotting ellipses a
    specified number of periods apart.
 
    See also ELLIPSEPLOT.
 
    Usage: index=periodindex(dt,omega,N);
           [index,bool]=periodindex(dt,omega,N);
    __________________________________________________________________
    This is part of JLAB --- type 'help jlab' for more information
    (C) 2011--2019 J.M. Lilly --- type 'help jlab_license' for details

contents | allhelp | index