Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MAX - expression

  1. May 17, 2012 #1
    How do I put down an expression that means the maximum value of a set of numbers?
     
  2. jcsd
  3. May 17, 2012 #2

    chiro

    User Avatar
    Science Advisor

    Hey xeon123.

    Typically we write the expression as y = max(x1,x2,x3,...) in notational terms.

    One way to write this is to use Heaviside functions where H(x) = 0 for x < 0 and 1 otherwise. If you want to just use a computer though then you can either sort a list and get the last element or implement an optimized routine that does the minimal number of compares to get the answer.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: MAX - expression
  1. Max. q (Replies: 4)

  2. Inequality with maxs (Replies: 1)

Loading...