Eig takes too long

17 ビュー (過去 30 日間)
bil
bil 2022 年 6 月 16 日
回答済み: Walter Roberson 2022 年 6 月 16 日
Hi All,
I am currently trying to find the eigenvectors for this 5x5 matrix but Matlab seems to be taking incredibly long to do so:
syms a b c d e f g h k l
p2 = [0 1/(a)^3 1/(b)^3 1/(c)^3 1/(d)^3;
1/(a)^3 0 1/(e)^3 1/(f)^3 1/(g)^3;
1/(b)^3 1/(e)^3 0 1/(h)^3 1/(k)^3;
1/(c)^3 1/(f)^3 1/(h)^3 0 1/(l)^3;
1/(d)^3 1/(g)^3 1/(k)^3 1/(l)^3 0];
[V,D]=eig(p2);
We can assume here that none of the variables are 0.
Does anyone have any suggestions or advice that can help speed up this calculation if that is even possible?
(I need to keep the matrix in symbolic form because I will need to manipulate the variable directly in a later calculation).
Thank you!

回答 (2 件)

Matt J
Matt J 2022 年 6 月 16 日
編集済み: Matt J 2022 年 6 月 16 日
Does anyone have any suggestions or advice that can help speed up this calculation if that is even possible?
I don't think the calculation itself is possible. A symbolic solution would mean finding the roots of a 5th order characteristic polynomial, which is theoretically known to have no analytical solutions,
I need to keep the matrix in symbolic form because I will need to manipulate the variable directly in a later calculation
That doesn't explain why you need sym. Please clarify.
  2 件のコメント
bil
bil 2022 年 6 月 16 日
Hi, the reason I need to maintain everything in symbolic form is because I need to solve a second order ODE. The situation is described below.
Basically I need to solve (1), which generates 5 coupled ODEs for each R_{n}=x_{n}. The issue is that I need to take the partial derivative of the overlap term, which necessarily requires me to find the eigenvectors of this matrix symbolically (unless there is a numerical way to do this).
Matt J
Matt J 2022 年 6 月 16 日
There are numerical ODE functions in Matlab,
Is there a reason one of them wouldn't apply?

サインインしてコメントする。


Walter Roberson
Walter Roberson 2022 年 6 月 16 日
syms M [5 5];
M = M - diag(diag(M));
[V, D] = eig(M);
When that eventually finishes (which will take a while), you can subs() actual expressions in place of symvars(M). Expect the subs() to take a while too.
Abandon hope of simplify() the results. And do not be surprised if it involves root() of a polynomial of degree 5.
...Prepare for the possibility that the results will be too large to be of any practical use.

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by