function out = scale(data, low, high)

%% only works with positive data!

[rows cols] = size(data);

for j = 1:cols
    colMax = max(data(:,j));
    colMin = min(data(:,j));
    
    for i = 1:rows
        out(i,j) = (data(i,j) - colMin)/(colMax - colMin);
    end
end