Matlab normalize between two values. The last element is an integer i