Eigenvector and Eigenvalue probelm
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I would like to get eigenvalues of matrix in my code given below, the matlab taking so much time as if never ending processws. Pl somebody hepl me how to find the eigenvalues quickly.
clc
close all
syms 'theta' 'alpha' 'phi' k
%% sigma matrices are here
sigma1=[0 1;1 0];
sigma2=[0 -1i;1i 0];
sigma3=[1 0;0 -1];
sigmap=1/2*(sigma1+1i*sigma2);
sigmam=1/2*(sigma1-1i*sigma2);
%% unit vetor on sphere
n=[sin(theta)*cos(phi);sin(theta)*sin(phi);cos(theta)];
identity1=eye(2);
identity2=identity1;
p1=sigma1*sin(theta)*cos(phi)+sigma2*sin(theta)*sin(phi)+sigma3*cos(theta);
p2=kron(sigmap,sigmap);
p3=kron(sigmam,sigmam);
h=1/2*alpha*kron(p1,identity2)+k*(p2+p3);
[V,L]=eig(h);
%% The componens of one of the eigen vectors of h above pasted from command palte
a1=(4*((alpha^2*cos(theta)^2)/4 - (k*(k^2 + alpha^2*cos(phi)^2*sin(theta)^2 + alpha^2*sin(phi)^2*sin(theta)^2)^(1/2))/2 + k^2/2 + (alpha^2*cos(phi)^2*sin(theta)^2)/4 + (alpha^2*sin(phi)^2*sin(theta)^2)/4)^(3/2))/(alpha^2*k*cos(phi)^2*sin(theta)^2 + alpha^2*k*sin(phi)^2*sin(theta)^2) - (4*k^2*cos(theta) + alpha^2*cos(theta)^3 + alpha^2*cos(phi)^2*cos(theta)*sin(theta)^2 + alpha^2*cos(theta)*sin(phi)^2*sin(theta)^2)/(2*(alpha*k*cos(phi)^2*sin(theta)^2 + alpha*k*sin(phi)^2*sin(theta)^2)) + (2*cos(theta)*((alpha^2*cos(theta)^2)/4 - (k*(k^2 + alpha^2*cos(phi)^2*sin(theta)^2 + alpha^2*sin(phi)^2*sin(theta)^2)^(1/2))/2 + k^2/2 + (alpha^2*cos(phi)^2*sin(theta)^2)/4 + (alpha^2*sin(phi)^2*sin(theta)^2)/4))/(alpha*k*cos(phi)^2*sin(theta)^2 + alpha*k*sin(phi)^2*sin(theta)^2) - ((alpha^2*cos(theta)^2 + 4*k^2 + alpha^2*cos(phi)^2*sin(theta)^2 + alpha^2*sin(phi)^2*sin(theta)^2)*((alpha^2*cos(theta)^2)/4 - (k*(k^2 + alpha^2*cos(phi)^2*sin(theta)^2 + alpha^2*sin(phi)^2*sin(theta)^2)^(1/2))/2 + k^2/2 + (alpha^2*cos(phi)^2*sin(theta)^2)/4 + (alpha^2*sin(phi)^2*sin(theta)^2)/4)^(1/2))/(alpha^2*k*cos(phi)^2*sin(theta)^2 + alpha^2*k*sin(phi)^2*sin(theta)^2);
b1=-(((alpha^2*cos(theta)^2)/4 - (k*(k^2 + alpha^2*cos(phi)^2*sin(theta)^2 + alpha^2*sin(phi)^2*sin(theta)^2)^(1/2))/2 + k^2/2 + (alpha^2*cos(phi)^2*sin(theta)^2)/4 + (alpha^2*sin(phi)^2*sin(theta)^2)/4)^(3/2)*8i)/(alpha^3*cos(phi)^3*sin(theta)^3*1i - alpha^3*sin(phi)^3*sin(theta)^3 + alpha^3*cos(phi)*sin(phi)^2*sin(theta)^3*1i - alpha^3*cos(phi)^2*sin(phi)*sin(theta)^3) + (cos(theta)*(alpha^2*cos(theta)^2 + 4*k^2 + 2*alpha^2*cos(phi)^2*sin(theta)^2 + 2*alpha^2*sin(phi)^2*sin(theta)^2))/(alpha^2*cos(phi)^3*sin(theta)^3 + alpha^2*sin(phi)^3*sin(theta)^3*1i + alpha^2*cos(phi)*sin(phi)^2*sin(theta)^3 + alpha^2*cos(phi)^2*sin(phi)*sin(theta)^3*1i) + (2*(alpha^2*cos(theta)^2 + 4*k^2 + 2*alpha^2*cos(phi)^2*sin(theta)^2 + 2*alpha^2*sin(phi)^2*sin(theta)^2)*((alpha^2*cos(theta)^2)/4 - (k*(k^2 + alpha^2*cos(phi)^2*sin(theta)^2 + alpha^2*sin(phi)^2*sin(theta)^2)^(1/2))/2 + k^2/2 + (alpha^2*cos(phi)^2*sin(theta)^2)/4 + (alpha^2*sin(phi)^2*sin(theta)^2)/4)^(1/2))/(alpha^3*cos(phi)^3*sin(theta)^3 + alpha^3*sin(phi)^3*sin(theta)^3*1i + alpha^3*cos(phi)*sin(phi)^2*sin(theta)^3 + alpha^3*cos(phi)^2*sin(phi)*sin(theta)^3*1i) - (cos(theta)*((alpha^2*cos(theta)^2)/4 - (k*(k^2 + alpha^2*cos(phi)^2*sin(theta)^2 + alpha^2*sin(phi)^2*sin(theta)^2)^(1/2))/2 + k^2/2 + (alpha^2*cos(phi)^2*sin(theta)^2)/4 + (alpha^2*sin(phi)^2*sin(theta)^2)/4)*4i)/(alpha^2*cos(phi)^3*sin(theta)^3*1i - alpha^2*sin(phi)^3*sin(theta)^3 + alpha^2*cos(phi)*sin(phi)^2*sin(theta)^3*1i - alpha^2*cos(phi)^2*sin(phi)*sin(theta)^3);
c1=-((alpha^2*cos(theta)^2)/2 + 2*k^2 + (alpha^2*cos(phi)^2*sin(theta)^2)/2 + (alpha^2*sin(phi)^2*sin(theta)^2)/2)/(2*((alpha*k*cos(phi)*sin(theta))/2 - (alpha*k*sin(phi)*sin(theta)*1i)/2)) + (2*((alpha^2*cos(theta)^2)/4 - (k*(k^2 + alpha^2*cos(phi)^2*sin(theta)^2 + alpha^2*sin(phi)^2*sin(theta)^2)^(1/2))/2 + k^2/2 + (alpha^2*cos(phi)^2*sin(theta)^2)/4 + (alpha^2*sin(phi)^2*sin(theta)^2)/4))/(alpha*k*cos(phi)*sin(theta) - alpha*k*sin(phi)*sin(theta)*1i);
d1=1;
m=sqrt(a1*conj(a1)+b1*conj(b1)+c1*conj(c1)+d1*conj(d1));
u=1/m*[a1;b1;c1;d1];
rho=u*ctranspose(u);
y=kron(sigma2,sigma2);
rhofinal=rho*y*ctranspose(rho)*y;
q=eig(rhofinal)
Second thing , is there any way to call the partulcar eigen vector of a given matirx. Because, here by the expression of a1,b1,c1 and d1 I actually have written the components of one of the eigenvector of h from command plate. But I think it is not an efficient way to write.
Pl help to do that.
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Linear Algebra in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!