When I create a image in matlab with rotate command. The image does not like the correct display. The tip is that the rotate changes the Xdata, Ydata, and Zdata properties of the appropriate graphics object. How can I control it? After I rotate the image, the y value will be the maximum, the shape is right. The maximum deformation is in the center of the plate, but the display is that the maximum (red region) is at the top of rotating plate. What's wrong? thank you
The simple example is as following:
x = (0:0.1:2);y = (0:0.1:2);X=ones(size(y))*x; Y=y*ones(size(x));Z = sin(X).*sin(Y);h = surf(X,Y,Z)hold onsurf(X+2,Y,Z)rotate(h,[0,1,0],90,[2,0,0])
Best Answer