DocumentationHelp Center
Element-wise quaternion power
C = A.^b
example
C = A.^b raises each element of A to the corresponding power in b.
C
A
b
collapse all
Create a quaternion and raise it to a real scalar power.
A = quaternion(1,2,3,4)
A = quaternion 1 + 2i + 3j + 4k
b = 3; C = A.^b
C = quaternion -86 - 52i - 78j - 104k
Create a 2-by-1 quaternion array and raise it to powers from a 2-D array.
A = quaternion([1:4;5:8])
A=2×1 quaternion array 1 + 2i + 3j + 4k 5 + 6i + 7j + 8k
b = [1 0 2; 3 2 1]
b = 2×3 1 0 2 3 2 1
C=2×3 quaternion array 1 + 2i + 3j + 4k 1 + 0i + 0j + 0k -28 + 4i + 6j + 8k -2110 - 444i - 518j - 592k -124 + 60i + 70j + 80k 5 + 6i + 7j + 8k
Base, specified as a scalar, vector, matrix, or multidimensional array.
Data Types: quaternion | single | double
quaternion
single
double
Exponent, specified as a real scalar, vector, matrix, or multidimensional array.
Data Types: single | double
Each element of quaternion A raised to the corresponding power in b, returned as a scalar, vector, matrix, or multidimensional array.
Data Types: quaternion
The polar representation of a quaternion A=a+bi+cj+dk is given by
A=‖A‖(cosθ+u^sinθ)
where θ is the angle of rotation, and û is the unit quaternion.
Quaternion A raised by a real exponent b is given by
P=A.^b=‖A‖b(cos(bθ)+u^sin(bθ))
exp
log
이 예제의 수정된 버전이 있습니다. 사용자가 편집한 내용을 반영하여 이 예제를 여시겠습니까?
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office