MATLAB: How to normalize a data serie which have negative and positive values for Prediction through ANN

MATLABnegativenormalizevalues

Hey,
I want normalize a data serie for prediction. The serie has negative and positive data.
First question, can I normalize data between 0 and 1 or should I normalize it between -1 and 1?
Second question, how do I normalize between -1 and 1?
Thank you

Best Answer

I dont know what is ANN.
But for normal scenarios, lets say your data is variable A.
factor = max([max(A) abs(min(A))]);
normalized_data = A/factor;