Rescaling Data Set: Solve Math Question for Physics Lab

  • Thread starter Thread starter fishingspree2
  • Start date Start date
  • Tags Tags
    Data Set
Click For Summary
SUMMARY

The discussion focuses on rescaling the difference between two non-negative numbers, A and B, to a defined interval of [-100, 100]. The user initially attempted to create a linear relationship using a slope derived from the values of A and B, but encountered issues with the mapping. The correct approach involves using the arctangent function, specifically the formula S = -100 * (2/π) * arctan(A-B), which effectively maps the differences to the desired range while addressing the limitations of linear scaling.

PREREQUISITES
  • Understanding of basic algebra and linear equations.
  • Familiarity with trigonometric functions, particularly the arctangent function.
  • Knowledge of scaling techniques in mathematical modeling.
  • Basic concepts of intervals and mapping in mathematics.
NEXT STEPS
  • Research the properties and applications of the arctangent function in scaling data.
  • Explore linear versus non-linear transformations in mathematical modeling.
  • Learn about the implications of mapping values to specific intervals in data analysis.
  • Investigate other mathematical techniques for rescaling data sets effectively.
USEFUL FOR

Students and professionals in physics, mathematics, and data analysis who are looking to understand and implement effective scaling techniques for numerical data in experiments or models.

fishingspree2
Messages
138
Reaction score
0
Hello, this is not really a math homework but I have a math question for a physics lab.

Let's say I have two numbers A and B which are both more or equal to 0.

Then, A-B is always in the interval [-B,A].
I want to assign the difference A-B to number S in an interval [-100,100], in such a way that if A = 0, A-B = -B and the scaled value S is 100, and if B=0, A-B=A and the scaled value is S = -100. Finally, if A-B = 0 then S = 0. Any other difference is scaled on the interval [-100 , 100].

First, I tried this: for difference = -B, then S=100
for difference = A, S=-100
for difference = 0, S=0
I have set up a linear equation using slope 100+100/-B-A = -200/(A+B).
Therefore, S = [-200/(A+B)]*difference = [-200/(A+B)]*(A-B)

Then, for any value A and B > 0, it should give me an S between [-100,100], but this does not work. I have no idea why.

Can anyone please point me towards the right direction?
 
Physics news on Phys.org
The relation you mention is not a linear one.

Moreover, you have not limited the values for A and B.
This means that an A-B of minus infinity must be mapped to S = +100,
that an A-B of plus infinity must be mapped to S = -100,
and that an A-B of zero must be mapped to S = 0.

You could do this for instance with:

[tex]S = -100 \frac {2} {\pi} \arctan(A-B)[/tex]
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
4
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K