You can specify which dimension of a quaternion array to take the product of.
Create a 2-by-2-by-2 quaternion array.
A = reshape(quaternion(randn(8,4)),2,2,2);
Find the product of the elements in each page of the array. The length of the first dimension matches size(A,1), the length of the second dimension matches size(A,2), and the length of the third dimension is 1.
Quaternions, specified as an array of quaternion objects of any dimensionality.
Example: qProd = prod(quat) calculates the quaternion
product along the first non-singleton dimension of
quat.
Dimension along which to calculate the quaternion product, specified as a
positive integer. If dim is not specified,
prod operates along the first non-singleton
dimension of quat.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.