Working code for scaling and rotation

This is the working MATLAB code for scaling and rotation. The test image
is memory itself that has been rotated and translated.