Menu

How to create peak calculation and manual marking of peaks in zedgraph. C# for a plot data

2019-04-22
2019-08-08
  • Mukesh kumar yadav

    I am ploting data from serial port.
    Want to detect peak count and manually marking peaks code wrt time on xaxis.
    Any suggestions or example code would be very helpful.

    -Thanks & Regards,
    Mukesh.

     
  • James Houx

    James Houx - 2019-08-08

    Peak Counting is typically a local maxima problem. The simplest algorithm divides the time into discrete intervals. For each interval, find the maximum. You will then have one peak for every interval. Then you can plot your peaks.

    There are other algorithms that get more sophisticated, but how you do it depends on exactly what you consider a peak. For instance, you may want to only count a maxima as a peak if it has a sharp angle that exceeds a certain threshold. In that case, you could apply that condition as a filter to the first simple algorithm. The result will be that some of your discrete time intervals don't have a peak while others have one peak.

     

Log in to post a comment.

MongoDB Logo MongoDB