I want all norm(t) should be same. But image should be rotated but here I am getting rotating image but rotated matrices norm are not same which effect furthr calculation and outut. Basically t is input in form of x and y matrices
x=[0.0517    0.0281    0.0122    0.0100
    0.0505    0.0344    0.0100    0.0006
    0.0513    0.0443    0.0122    0.0006
    0.0513    0.0443    0.0152    0.0034];
y=[-0.0118   -0.0012    0.0016   -0.0025
    -0.0268   -0.0076   -0.0026   -0.0026
    -0.0344   -0.0337   -0.0026   -0.0025
    -0.0352   -0.0329   -0.0214   -0.0130];
figure
imagesc(sqrt(x.^2+y.^2))
m=length(x);
x2=reshape(x,[],1);y2=reshape(y,[],1);
t=zeros(2*length(x2),1);
t(1:2:end)=x2;
t(2:2:end)=y2;
norm(t)
R=[cos(Set.angle) sin(Set.angle) ; -sin(Set.angle) cos(Set.angle)];
for i=1:m
    for j=1:m
        ts=[x(i,j) y(i,j)]';
        ts=R'*ts; % Transpose: No frame change, but rotation of vector
        %ts=R*ts;
        % if ts(1) >= 1 && ts(1) <= i && ts(2) >= 1 && ts(2) <= j
        x(i,j)=ts(1);
        y(i,j)=ts(2);
        %         end
    end
end
norm(t)
xR = imrotate(x, Set.angle*180/pi, 'bicubic', 'crop');
yR = imrotate(y, Set.angle*180/pi, 'bicubic', 'crop');
x1=reshape(xR,[],1);y1=reshape(yR,[],1);
t1=zeros(2*length(x1),1);
t1(1:2:end)=x1;
t1(2:2:end)=y1;
figure
imagesc(sqrt(xR.^2+yR.^2))
norm(t1)








