Let's say:
x=1:0.2:1.8= [1 1.2 1.4 1.6 1.8];y=2:0.2:3 = [2 2.2 2.4 2.6 2.8 3];z=[2 5 2 2 2; 2.1 2.1 2.1 2.1 2.1; 2 2 2 2 2; 3 3 3 3 3; 1 1 1 1 1; 2.5 2.5 2.5 2.5 2.5]; %matrix 6-by-5
[X,Y] = meshgrid(x,y);surf(X,Y,Z);% the plot show below
The question is: How can I rotate the plot data with the angel=10 (degree), counterclockwise about Z axis, & How can I plot the new meshgrid surface (using the new rotate data) as the below figure?
angel=10;R=[cosd(angel) -sind(angel) 0;sind(angel) cosd(angel) 0;0 0 1];%the rotation matrix R
Best Answer