function output = regularazation(input)

[n,m] = size(input);

oldmax = max(input);
oldmin = min(input);
newmax = 1;
newmin = -1;

for i=1:n
	for j=1:m
		if (input(i,j)~=0)
			output(i,j) = ((input(i,j) - oldmin(j))/(oldmax(j) - oldmin(j))) * (newmax - newmin) + newmin;
		end
	end
end
