Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a range of number that are coming in from 0 - 1 for example: 0.178 0.45 0.89 0.41

The highest they can go is 1.0

I would like to convert these into a scale going from 1 - 180

So if the number that came in was 0.5

share|improve this question
2  
Let $x \in [0,1]$. Then $y = 179x+1$. –  Joshua Shane Liberman Dec 7 '12 at 19:17

1 Answer 1

In general, you are looking for an affine transformation of the variable $0 \le x \le 1$ to some other domain $a \le y \le b$.

The general form of this is

$$y = (b-a)x + a$$

In your case, $b = 180$, $a = 1$, so you get, as Joshua said in his comment,

$$y = 179x+1.$$

This works for all $b > a$, but if you have $x$ defined in some other interval, you have to be more careful!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.