code>quatinv</code> is vectorized and will accept arrays of unit quaternions of size 4xNxMx... with an arbitrary number of dimensions, in which case the inverse quaternions will be returned as an array of size 4xNxMx... .
</p>

<!-- ============================================================= -->
<div class="subtitle">Examples</div>

<p>
Taking an arbitrary quaternions and normalizing the result, we perform quaternion inversion
</p>

<pre class="matlab">
q = [0.1; 0.438; -0.879; 0.699];
q = q./sqrt(sum(q.^