function [ var ] = rot( theta )for j=1:2, for i=j:2, if (i==j) var(i,j) = cosd(theta); elseif (i-j>0) var(i,j) = sind(theta); else var(i,j) = -sind(theta); end endendvar;end
The problem, is with var(1,2) which always displays a zero irrespective of angle value.
Best Answer