meanrot
Quaternion mean rotation
Description
quatAverage = meanrot(quat)quat along the
                first array dimension whose size not does equal 1.
- If - quatis a vector,- meanrot(quat)returns the average rotation of the elements.
- If - quatis a matrix,- meanrot(quat)returns a row vector containing the average rotation of each column.
- If - quatis a multidimensional array, then- mearot(quat)operates along the first array dimension whose size does not equal 1, treating the elements as vectors. This dimension becomes 1 while the sizes of all other dimensions remain the same.
The meanrot function normalizes the input quaternions,
                    quat, before calculating the mean.
quatAverage = meanrot(quat,dim)dim. For example,
                if quat is a matrix, then meanrot(quat,2) is
                a column vector containing the mean of each row.
quatAverage = meanrot(___,nanflag)NaN values from the
                calculation for any of the previous syntaxes.
                    meanrot(quat,"includenan") includes all
                    NaN values in the calculation while
                    mean(quat,"omitnan") ignores them.
Examples
Input Arguments
Output Arguments
Algorithms
meanrot determines a quaternion mean, , according to [1].  is the quaternion that minimizes the squared Frobenius norm of the
            difference between rotation matrices:
References
[1] Markley, F. Landis, Yang Chen, John Lucas Crassidis, and Yaakov Oshman. "Average Quaternions." Journal of Guidance, Control, and Dynamics. Vol. 30, Issue 4, 2007, pp. 1193-1197.



