Question #168577

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


Expert's answer

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
LATEST TUTORIALS
APPROVED BY CLIENTS