function [transImg] = myTranslation(origImg, transAmount)

if transAmount == 0;
    % if no translation, i.e. transAmount - 0
    transImg = origImg;
else
    
    % create an empty image, same size as the original image
    transImg = zeros(size(origImg));
    
    % traverse columns and shift by transAmount
    if transAmount < 0
        for i = 1:size(origImg,2)+transAmount
            transImg(:,i) = origImg(:,(i-transAmount));
        end
    else
        for i = 1:(size(origImg,2)-transAmount)
            transImg(:,i+transAmount) = origImg(:,i);
        end
    end
end

end