旋转矩阵不就是
[x,y] = meshgrid(1:5);
x_new = zeros(size(x));
y_new = zeros(size(y));
theta = 30*pi/180;
T = [cos(theta), -sin(theta); sin(theta),cos(theta)];
x_new(:) = cos(theta)*(x(:)-2) - sin(theta)*(y(:)-2) + 2;
y_new(:) = sin(theta)*(x(:)-2) + cos(theta)*(y(:)-2) + 2;