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

1 visualización (últimos 30 días)
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 comentario
Roger Stafford
Roger Stafford el 11 de Abr. de 2018
Editada: Roger Stafford el 11 de Abr. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by