Hi Monks,

I am really very stuck and wondered if I could pick your brains. My problem is that I am reading in a data file to my program from which a graph can be created like below. The graph should form a peak and I am interested in the value of the peak - which may or may not lie on a data-point. I was wondering if anyone new a way of finding the highest data-point?? I was thinking about perhaps using quadratic regression where you fit the best curve to the data, however, my maths is limited and I have no idea how to implement this. Any help would be greatly appreciated.

Cheers!

# e.g. - much more numbers in the real file my @array = ('62.6', '62.8', '63', '63.3', '63.5', '63. +7', '64'); my @array2 = ('7.476', '7.5219', '7.5464', '7.5516', '7.55 +04', '7.5372', '7.518');

Edit by tye, title, add P tags


In reply to mathsy question: finding max of curve from discrete points by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.