% affine transformation SCALING 
clear
x = [2 1 3 4;
    1 1 2 3;
    4 2 1 3;
    2 2 3 1] % input
w = [0.75 0 0; 0 0.5 0; 0 0 1] % scale
tform=maketform('affine',w);
out = imtransform(x',tform,'nearest')' % output









