How Do You Map a Range of Values to a Smaller Scale?

  • Context: High School 
  • Thread starter Thread starter jla2125
  • Start date Start date
  • Tags Tags
    Mapping
Click For Summary

Discussion Overview

The discussion centers around the mathematical problem of mapping a range of values (from 182 to 455) to a smaller scale (1 to 50). Participants are seeking a general equation or function that can achieve this transformation, exploring different approaches and equations.

Discussion Character

  • Mathematical reasoning

Main Points Raised

  • One participant, Jeremy, asks for a function that maps values from a specified range to a smaller range.
  • Another participant suggests a linear equation: f(x)=1 + 49*(x-182)/(455-182) as a potential solution.
  • A later reply questions the general applicability of the proposed form and suggests a more generalized equation: f(n) = x1 + (x2 - 1)*(n - y1)/(y2 - y1), where x1, x2, y1, and y2 are defined values.
  • There is a correction regarding a typo in the generalized equation, clarifying that it should be (x2 - x1) instead of (x2 - 1).

Areas of Agreement / Disagreement

Participants have not reached a consensus on the general applicability of the proposed equations, and there are differing views on the best approach to mapping the values.

Contextual Notes

The discussion does not clarify the assumptions behind the proposed equations or their limitations in different contexts.

jla2125
Messages
16
Reaction score
0
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
 
Physics news on Phys.org
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.
 
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)
 
jla2125 said:
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)

Yes: after fixing typo - should have (x2-x1)
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 12 ·
Replies
12
Views
5K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 9 ·
Replies
9
Views
931
Replies
7
Views
2K
  • · Replies 21 ·
Replies
21
Views
2K