This code gives me this mistake Error using eig For standard eigen problem EIG(A), A must be square.I hope anybody help me

2 ビュー (過去 30 日間)
T=0:5; F=@(n)3.^n.*cos(T); G=0; for m=0:5; G=G+[F(m-1) F(m+1) F(m+2);F(m+3) F(m+1) F(m+2);F(m) F(m+1) F(m+2)] end q=eig(G)
  1 件のコメント
Roger Stafford
Roger Stafford 2018 年 4 月 11 日
編集済み: Roger Stafford 2018 年 4 月 11 日
As you have defined G, it will be a singular matrix - that is, its determinant will be zero, because its rows are clearly not linearly independent. That will lead to a lot of trouble. So your problem is fundamental.
The error message is undoubtedly due to the fact that each F entry is a 1-by-6 array which makes G be 3-by-18 and therefore not square. That I think is easily corrected, but that is not the main problem. Singularity is what you need to worry about.

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

回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by