Hi Giovanni,
I understand that you want to normalize your data from the range of -2 to 2 without rescaling the limits of the Y-axis. You can refer to the following code snippet:
% Normalize input data
normalized_input = ((input_data - min(input_data)) * (4 / (max(input_data) - min(input_data)))) - 2;
% Normalize output data
normalized_output = ((output_data - min(output_data)) * (4 / (max(output_data) - min(output_data)))) - 2;
The formula first normalizes the data between 0 and 1 using the "min" and "max" functions. It then scales the normalized data between -2 and 2 by multiplying it with 4 and subtracting 2.
Hope this helps!