Apply affine transforms to graphic objects (Scripts) Publisher's description
from Pirmin Borer
The advantage of the function compared to hgtransform objects is that it operates directly on the XData
The advantage of the function compared to hgtransform objects is that it operates directly on the XData,YData and ZData of the object which allows ButtonDownFcn callbacks to execute even when the object was moved. Moreover the applied transforms can be undone or redone stepwise as well as objects can be reseted. The transforms are stored as a structure in the 'UserData' of the graphic objects
The function supports line, surface, patch and text objects
[M step]=transform(obj, tmatrix)
applies the transform matrix 'tmatrix' to the graphic objects obj. Obj can be line,surface, patch, text or group objects.
Output 'M' is a cell array of transform matrices and step the index of the last transform applied.
[M step]=transform(obj,'undo',nb_steps) undoes 'nb_steps'
[M step]=transform(obj,'redo',nb_steps) redoes 'nb_steps'
transform(obj,'reset') resets obj to initial value. It deletes all transforms and associated UserData
%rotate peaks surface by pi/4 around z-axis
%undo last step
System Requirements:MATLAB 7.5 (R2007b)
Program Release Status: New Release
Program Install Support: Install and Uninstall