Some methods
#1
YData = YData / max(abs(YData));
#2
maxYdataAbs = abs(max(YData));
minYdataAbs = abs(min(YData));
YData = YData / (0.5*(maxYdataAbs + minYdataAbs));
I am not happy with neither one.
Assume that you have the following data.
Only one or two sharp peaks. I am not happy with #1 or #2.
I am not sure anymore if the best way is to normalise to the range $[-1,1]$.
How should you normalise such a data?