Forum FlexPro – Discuss your topic!

Seeking extrema

Accueil > Community > FPScript > Seeking extrema

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12505
    Dirk KampffmeyerDirk Kampffmeyer
    Participant

    Hello,
    I would like to search an extrema and reduce the signal starting from this extrema. The program, however, outputs nothing but a failure of data structure.
    dim idxextrema=GlobalMaximum(Ch1,EVENT_INDEX)
    CH1[[idxextrema, Empty]]

    #8168
    Dirk KampffmeyerDirk Kampffmeyer
    Participant

    Hello,
    I would like to search an extrema and reduce the signal starting from this extrema. The program, however, outputs nothing but a failure of data structure.
    dim idxextrema=GlobalMaximum(Ch1,EVENT_INDEX)
    CH1[[idxextrema, Empty]]

    #8805
    Bernhard KantzBernhard Kantz
    Participant

    Why do you use the Value Index operator and Empty as second argument?
    The result of GlobalMaximum is a data series with the indices of the maxima. In your case you need a scalar start index and a scalar end index. Use the Index operator. -1 is the index of the last value.

    
    CH1[idxextrema[0], -1]
    

    The result is a signal starting from the first maximum.

    If you only need the maximum y-value use the Maximum-function.

    
    Maximum(ch1) //is equivalent to CH1[idxextrema[0]]
    

    support@weisang.com

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.