C = A - B
subtracts quaternion B from quaternion A
using quaternion subtraction. Either A or
B may be a real number, in which case subtraction is
performed with the real part of the quaternion argument.
Addition and subtraction of real numbers is defined for quaternions as acting on the real part of the quaternion. Create a quaternion and then subtract 1 from the real part.
A — Input quaternion object | array of quaternion objects | real scalar | array of real numbers
Input, specified as a quaternion object, an array of quaternion
objects of any dimensionality, a real scalar, or an array of real numbers of
any dimensionality. Numeric values must be of data type
single or double.
A and B must have compatible
sizes. In the simplest cases, they can be the same size or one can be a
scalar. Two inputs have compatible sizes if, for every dimension, the
dimension sizes of the inputs are the same or one of the dimensions is
1.
B — Input quaternion object | array of quaternion objects | real scalar | array of real numbers
Input, specified as a quaternion object, an array of quaternion
objects of any dimensionality, a real scalar, or an array of real numbers of
any dimensionality. Numeric values must be of data type
single or double.
A and B must have compatible
sizes. In the simplest cases, they can be the same size or one can be a
scalar. Two inputs have compatible sizes if, for every dimension, the
dimension sizes of the inputs are the same or one of the dimensions is
1.
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.