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

Range mapping

  1. Jun 26, 2009 #1
    Hey! I have a really easy question here, but I still can't figure it out.

    I have a range of values from 182 to 455. I need a function that gives me back values from 1-50. IE, f(318) = 25. The numbers aren't critical, but I'd love a general equation to use for this kinda stuff. Can anybody help me out?

    Thanks,
    ~Jeremy
     
  2. jcsd
  3. Jun 26, 2009 #2

    mathman

    User Avatar
    Science Advisor
    Gold Member

    The simplest equation would be linear.

    f(x)=1 + 49*(x-182)/(455-182)

    There are obvious many other possibilities depending on the information you have.
     
  4. Jun 26, 2009 #3
    will that form work for just about anything?

    IE:
    given: 1 = x1, 50 = x2, 182 = y1, 455 = y2:
    f(n) = x1 + (x2 - 1)*(n - y1)/(y2 - y1)
     
  5. Jun 27, 2009 #4

    mathman

    User Avatar
    Science Advisor
    Gold Member

    Yes: after fixing typo - should have (x2-x1)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Range mapping
  1. Range for this graph? (Replies: 2)

  2. Range of a function (Replies: 8)

  3. Karnaugh maps? (Replies: 1)

  4. Range of sqrt (Replies: 2)

  5. Range of this function (Replies: 4)

Loading...