Eigen value of 100*100 Symbolic Matrix
Mostra commenti meno recenti
I am constructing a symbolic matrix and want to get eigen values and eigen vectors. Using following code I got error.
syms E t
Na = 100;
Nb = 100;
H =zeros(Na,Nb);
H =sym(H);
% E=1;t=1;
for i = 1:Na
for j = 1:Nb
if (i==j)
H(i,j)= E;
elseif (i-j==1|| i-j==2||i-j==3 )
H(i,j)= -t;
elseif (i-j ==-1|| i-j==-2||i-j==-3 )
H(i,j)=(-t);
end
end
end
If i would have used
[V,D]=eig(H)
it was taking too long. I don't know when it's gonna stop. Why is that? Then I tried to calculate only Eigenvalue, but an error occured:
"Error using symengine
Column index out of range."
How to sort it out?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Just for fun in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!