Learn R Programming

freesurferformats (version 1.0.1)

m44_to_quaternion: Compute quaternion representation of a rotation from a 4x4 rotation matrix.

Description

Compute quaternion representation of a rotation from a 4x4 rotation matrix.

Usage

m44_to_quaternion(m)

Value

numeric vector of length 4, the quaternion representation (qw, qx, qy, qz).

Arguments

m

the input 4x4 matrix encoding the rotation, with homogeneous column [0,0,0,1].