Possible Duplicate:
MATLAB: how to normalize/denormalize a vector to range [-1;1]
I'm designing a Neural Network. As you know the inputs are preferred to be small, like between (0,1) or (-1,1). My data is in the range (1,9) .. how can I scale it to become within (-1,1) ? I know I can use a Sin function, but I'm not sure if that's correct .. is there another way ?