find the tform of the image first and then translate it
This is an example of how to use imtransform to translate the onion.png image in x and y. It may serve as a useful example to others, but it has no comments. It is not a general-purpose function that does anything useful and appears to be a homework assignment.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.