hi. i wrote 4 functions. now i want to plot the forth function but it gives me errors. plz help me to plot it.
plot3(C(J,d),J,d)function ha = H(J,d) sx=[0 1;1 0]; sy=[0 -1i;1i 0]; sz=[1 0;0 -1]; ha = J/2*(kron(sx,sx)+kron(sy,sy)+kron(sz,sz))+d*(kron(sx,sy)-kron(sy,sx)); endfunction ro = R(J,d) T=0.5; ro = expm(-H(J,d)/T)/trace(expm(-H(J,d)/T));endfunction la = landa(J,d) sy=[0 -1i;01i 0]; s=kron(sy,sy); la = real(sqrt(eig(R(J,d)*s*conj(R(J,d))*s)));endfunction co = C(J,d) co=max(0,2*max(landa(J,d))-sum(landa(J,d)));end
Best Answer