Function File: r = rotv ( v, ang )

The functionrotv calculates a Matrix of rotation about v w/ angle |v| r = rotv(v [,ang])

Returns the rotation matrix w/ axis v, and angle, in radians, norm(v) or ang (if present).

rotv(v) == w’*w + cos(a) * (eye(3)-w’*w) - sin(a) * crossmat(w)

where a = norm (v) and w = v/a.

v and ang may be vertically stacked : If ’v’ is 2x3, then rotv( v ) == [rotv(v(1,:)); rotv(v(2,:))]

See also: rotparams, rota, rot.

Package: linear-algebra