フィルターのクリア

How to solve an equation with big matrix?

5 ビュー (過去 30 日間)
Saverio Loiacono
Saverio Loiacono 2024 年 2 月 2 日
コメント済み: Saverio Loiacono 2024 年 2 月 2 日
Hello,
I have a problem solving this type of equation: det((-w^2)*Ma+Ka)==0
I've tried several times, using syms, fsolve, etc... Due to the sizes fo the matrix Ma and Ka that is for both 288X288, the matlab is not able to find the q solutionc of w (that is the unkown), where q is equal to tha arrays of the matrix (288). I've tried this types of code:
1)syms f(x)
f(x) = det(-(x^2)*Ma2+Ka2);
sol = vpasolve(f);
2)syms w
S = det(-(w^2)*Ma+Ka)==0;
solve = S;
3)myfun = @(x)det((-x.^2)*Ma+Ka);
[a,b]=size(Ma);
x0 = zeros(2*a,1);
C = fsolve(@(x)det((-x.^2)*Ma+Ka),x0);
None of them works, any solution? I will appreciate your help.
  5 件のコメント
Saverio Loiacono
Saverio Loiacono 2024 年 2 月 2 日
I’m sorry w ,that is the unknown,is a number, it is not a vector. And from the equation I should obtain 288 solution for w. That is for clarity a frequency.
Saverio Loiacono
Saverio Loiacono 2024 年 2 月 2 日
So it’s a single value as you defined it before

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

採用された回答

Torsten
Torsten 2024 年 2 月 2 日
編集済み: Torsten 2024 年 2 月 2 日
Looks like a generalized eigenvalue problem of the form
(A - w^2*B)*x = 0
with unknown x and w.
Use "eig" to solve it.
  3 件のコメント
Torsten
Torsten 2024 年 2 月 2 日
編集済み: Torsten 2024 年 2 月 2 日
From the documentation:
[V,D,W] = eig(A,B)
The generalized eigenvalue problem is to determine the solution to the equation Av = λBv, where A and B are n-by-n matrices, v is a column vector of length n, and λ is a scalar. The values of λ that satisfy the equation are the generalized eigenvalues. The corresponding values of v are the generalized right eigenvectors. The left eigenvectors, w, satisfy the equation wA = λwB.
Thus in your case:
e = eig(Ka,Ma)
The elements of e are your elements w^2. Taking the positive and negative square roots give you the 2*288 possible values for w.
Saverio Loiacono
Saverio Loiacono 2024 年 2 月 2 日
thank you so much, I appreciate your help.

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by