Jacobi Plane rotation for a matrix A
6 ビュー (過去 30 日間)
古いコメントを表示
How to perform the Jacobi Rotation (Jacobi Method) for given matrix
There exists a rotation (c = cos(theta) and s = sin(theta))
For example how can we estimate rotation for the following matrix
A = [-17.7147 -38.4117 30.6475
-51.3024 17.3859 -10.0354
-19.3323 -38.8931 30.3686
-51.2891 18.9043 -11.1523
-21.42 -39.2796 29.9065
-51.1701 20.7146 -12.4891
-24.2543 -39.5276 29.3515
-51.0782 22.9095 -14.1458]
Using C++ Eigen libaray the result is following: http://eigen.tuxfamily.org/dox-3.2/classEigen_1_1JacobiRotation.html
Result = [ 110.564 -7.77137 -0.308057
0 87.445 -64.7691
0 0 1.86159
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0]
Using matlab inbuilt function qr ([~,R]=qr(A)) gives me the following:
R = [ 110.5645 -7.7714 -0.3081
0 -87.4451 64.7691
0 0 -1.8616
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0]
As you can see the first row result is same in C++ and matlab.
whereas the second and third row signs are not matching.
What is the correct solution or how can it be implemented in matlab?
Thank you!!
0 件のコメント
回答 (1 件)
KSSV
2020 年 8 月 21 日
Define the ngle of your rotation theta:
A = [-17.7147 -38.4117 30.6475
-51.3024 17.3859 -10.0354
-19.3323 -38.8931 30.3686
-51.2891 18.9043 -11.1523
-21.42 -39.2796 29.9065
-51.1701 20.7146 -12.4891
-24.2543 -39.5276 29.3515
-51.0782 22.9095 -14.1458] ;
theta = pi/4 ;
R = [cos(theta) sin(theta) 0 ;
-sin(theta) cos(theta) 0 ;
0 0 1] ;
Ar = A*R
参考
カテゴリ
Help Center および File Exchange で 3-D Scene Control についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!