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 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Roger Stafford
am 11 Apr. 2018
Bearbeitet: Roger Stafford
am 11 Apr. 2018
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.
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!