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 clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
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.