How to calculate values after scaling numbers.

431 Views Asked by At

I have two number list old scale and the new scale.
What formula would I use to find the new scale value if the old scale value is 5.89345? Is it possible to calculate the new scale value if the old scale value is 1.342? Or if the new scale value is 4.32 how would I figure out the old scale value

old scale           new scale
4                     2
5                   2.6                         
6                   3.2
7                   3.8
8                   4.4
9                     5

I'm coding this in Octave 4.0 which is similar to Matlab

1

There are 1 best solutions below

5
On BEST ANSWER

If we assume a linear model, then by inspection of your table,

$$y = 2 + 0.6(x-4)$$

(Do you see how I did that?)

Your old value is $x$ and the corresponding new value is $y$.

Additional info based on your comments:

If your data is in fact linear (you can draw a straight line exactly through all of the points) then all you need is two of the rows to fill out a table.

Your step size will be $m = (y_2-y_1)/(x_2-x_1)$. The math term for this is the slope of the line. Plugging in the numbers from your table above gives

$$m = \frac{2.6-2.0}{5-4} = 0.6.$$

As far as the programming part in Octave, I'm not familiar with that, but assuming you can program in Octave, that's how you get the step size.