Hi,

I have been having a problem with the eigenvalue function. I have two 240×240 matrices (which I have attached with this post) that I add together, and then get matrices of eigenvalues and eigenvectors. I have many such matrices like the ones that I posted that are added together and such during the program, but this combination does not work for some reason. It always works with the eigenvalues, so it seems like the eigenvectors are causing the problem. Any clues as to why so? The line of code that I have been using is:

[a,b] = eig(hh(1:240,1:240)+ pot(1:240,1:240));

The reason that I specified the range of indices is that if I use either 1:239 or 2:240 on both "hh" and "pot" at the same time, the eig function doesn't have a problem anymore. Anyway, thanks for any help you can give.

## Best Answer