ある行列の一般逆行列を求める際にpinvを使用すると、フリーズしてしまいます。
Afficher commentaires plus anciens
行列の一般逆行列を計算する際、行列によってすぐに計算されるものとフリーズしてしまうものがあります。行列のサイズに大きな差はないのですが、、、 たとえば、 A =
[ 3^(1/2)/6, 0, 1/2, -3^(1/2)/(3*h), 0, -1/h, 0, 0]
[ 3^(1/2)/6, 0, 1/2, 3^(1/2)/(3*h), 0, 1/h, 0, 0]
[ -3^(1/2)/12, 3^(1/2)/4, 0, 3^(1/2)/(6*h), -3^(1/2)/(2*h), 0, 0, 0]
[ -3^(1/2)/12, 3^(1/2)/4, 0, -3^(1/2)/(6*h), 3^(1/2)/(2*h), 0, 0, 0]
[ 3^(1/2)/6, 0, -1/2, -3^(1/2)/(3*h), 0, 1/h, 0, 0]
[ 3^(1/2)/6, 0, -1/2, 3^(1/2)/(3*h), 0, -1/h, 0, 0]
[ 0, 0, 0, 0, 0, 0, -1/s, 0]
[ 0, 0, 0, 0, 0, 0, 1/(2*s), 3^(1/2)/(2*s)]
[ 0, 0, 0, 0, 0, 0, 1/(2*s), -3^(1/2)/(2*s)]
はすぐに計算されますが、
B =
[ 3/4, 3^(1/2)/4, 0, 3^(1/2)/8, 3/4, 3^(1/2)/4, 0, 0, 0, 0, 0, 0]
[ 3^(1/2)/4, 0, 0, 0, -3^(1/2)/4, 0, 0, 0, 0, 0, 0, 0]
[ 1/4, 0, 1, 3^(1/2)/4, 1/4, 3^(1/2)/4, 0, 0, 0, 0, 0, 0]
[ -(3*h)/8, (3^(1/2)*h)/8, 0, (3^(1/2)*h)/16, -(3*h)/8, (3^(1/2)*h)/16, 0, 0, 0, 0, 0, 0]
[ -(3^(1/2)*h)/8, 0, 0, 0, (3^(1/2)*h)/8, 0, 0, 0, 0, 0, 0, 0]
[ -h/8, 0, -h/2, (3^(1/2)*h)/8, -h/8, (3^(1/2)*h)/8, 0, 0, 0, 0, 0, 0]
[ 0, 0, 0, 0, 0, 0, (3^(1/2)*s)/4, 0, 0, -(3^(1/2)*s)/4, 0, -(3^(1/2)*s)/4]
[ 0, 0, 0, 0, 0, 0, 0, 0, -s/4, s/4, s/4, -s/4]
はフリーズします。(s,hはsyms s hでシンボリック変数を作成しています。) 問題点を指摘していただければ、幸いです。よろしくお願い致します。
2 commentaires
Aoi Midori
le 3 Déc 2018
上の記述で行列AとBを作成すると1x8および1x12のサイズになるのですが、9x8および8x12のサイズでpinv実行されたということですよね?
m17td024
le 3 Déc 2018
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 線形代数 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!