ldivide, .\
Syntax
Description
Examples
Divide a Quaternion Array by a Real Scalar
Create a 2-by-1 quaternion array, and divide it element-by-element by a real scalar.
A = quaternion([1:4;5:8])
A = 2x1 quaternion array
1 + 2i + 3j + 4k
5 + 6i + 7j + 8k
B = 2; C = A.\B
C = 2x1 quaternion array
0.066667 - 0.13333i - 0.2j - 0.26667k
0.057471 - 0.068966i - 0.08046j - 0.091954k
Divide a Quaternion Array by Another Quaternion Array
Create a 2-by-2 quaternion array, and divide it element-by-element by another 2-by-2 quaternion array.
q1 = quaternion([1:4;2:5;4:7;5:8]); A = reshape(q1,2,2)
A = 2x2 quaternion array
1 + 2i + 3j + 4k 4 + 5i + 6j + 7k
2 + 3i + 4j + 5k 5 + 6i + 7j + 8k
q2 = quaternion(magic(4)); B = reshape(q2,2,2)
B = 2x2 quaternion array
16 + 2i + 3j + 13k 9 + 7i + 6j + 12k
5 + 11i + 10j + 8k 4 + 14i + 15j + 1k
C = A.\B
C = 2x2 quaternion array
2.7 - 1.9i - 0.9j - 1.7k 1.5159 - 0.37302i - 0.15079j - 0.02381k
2.2778 + 0.46296i - 0.57407j + 0.092593k 1.2471 + 0.91379i - 0.33908j - 0.1092k
Input Arguments
A
— Divisor
quaternion
object | array of quaternion
objects | real scalar | array of real numbers
Divisor, 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
— Dividend
quaternion
object | array of quaternion
objects | real scalar | array of real numbers
Dividend, 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.
Output Arguments
C
— Result
quaternion
object | array of quaternion
objects
Result of quaternion division, returned as a quaternion
object or
an array of quaternion
objects.
Algorithms
Quaternion Division
Given a quaternion and a real scalar p,
Note
For a real scalar p, A./p = A.\p.
Quaternion Division by a Quaternion Scalar
Given two quaternions A and B of compatible sizes, then
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2020a
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
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: .
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.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)