The formula for normalizing data-in a vector x-into the range [0,1] is given by
Z1=(x1-min(x))/(max(x)-min(x))
implement the formula above in a function
function [x_norm] = normalize(x)
%function normalizes data in a vector x into the range [0,1]
x_norm = (x - min(x))/(max(x)-min(x));
end
Comments
Leave a comment