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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an acceleration vector in m/s^2 and I am going to use an algorithm that assumes these values are between -1 and 1. I have searched the web and found formulas to get it between 0 and 1.

Especially this formula: $x' = \frac{x - \min}{\max - \min}$ but I think this will give me values between 0 and 1. I do know that $min = -max$, so $x' = \frac{x - \min}{2\cdot \max}$.

My math is really lacking, so I don't know how to get this value to be between -1 and 1.

share|cite|improve this question

If $x \in [0,1]$, then $2x-1 \in [-1,1]$.

share|cite|improve this answer
    
That's Nice!!+1 :) – Aang Mar 9 '13 at 9:23

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.