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

  • Thread starter Thread starter jla2125
  • Start date Start date
  • Tags Tags
    Mapping
Click For Summary
To map a range of values from 182 to 455 onto a smaller scale of 1 to 50, a linear function can be used. The equation f(x) = 1 + 49*(x-182)/(455-182) effectively transforms the input values. An alternative formula, f(n) = x1 + (x2 - x1)*(n - y1)/(y2 - y1), is also applicable for similar mappings, where x1 and x2 are the new range limits and y1 and y2 are the original range limits. This approach can be adapted for various ranges as long as the parameters are correctly defined. The discussion confirms that the linear mapping method is versatile for different value ranges.
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
 
Mathematics 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)
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 3 ·
Replies
3
Views
6K
Replies
7
Views
2K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
Replies
9
Views
4K
Replies
7
Views
4K
  • · Replies 26 ·
Replies
26
Views
5K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K