www.pudn.com > calibr8.zip > rotmatrix.m


function matrix = rotmatrix(angle)
%matrix = rotmatrix(angle)
%
%Generate rotation matrix for the given angle 
%
%Input:
%  ANGLE  - required rotation angle (anticlockwise direction, in degrees)
%
%Output:
%  MATRIX - corresponding rotation matrix
%
%See also:
%  DIR2ROT, TRANSFORM
%
%Radim Halir, Charles University Prague, halir@ms.mff.cuni.cz
%Created: 14.1.1998
%Last modified 14.1.1998

angle = angle / 180 * pi;
matrix = [cos(angle), - sin(angle); sin(angle), cos(angle)];