Se for utilizar o material, favor citar como: 1)J.P. Braga e F.S. Carvalho, Métodos Numéricos em Química Quântica, 2021. 2)J.P. Braga, Fundamentos de Química Quântica, Editora UFV, 2015. x=-10:.1:10;plot(x,heaviside(x-2),'*') x=-10:.1:10;plot(x,1-heaviside(x-2),'*') function y=V(V0,L,d,r) y=(-heaviside(r-d/2) + heaviside(r-(L+d/2))+1)*V0; function y=EpH(V0,n,d,L,r) if n<2,y=(-heaviside(r-d/2) + heaviside(r-(L+d/2))+1)*V0;else, y(n,:)=(-heaviside(r(n,:)-d/2) + heaviside(r(n,:)- ... (L+d/2))+1)*V0; for i=1:n-1,y(n-i,:)=(-heaviside(r(n-i,:)-(d/2-(i)*(L+d))) + ... heaviside(r(n-i,:)-(L+d/2-(i)*(L+d)))+1)*V0; y(n+i,:)=(-heaviside(r(n+i,:)-(d/2+(i)*(L+d))) + ... heaviside(r(n+i,:)-(L+d/2+(i)*(L+d)))+1)*V0;end,end V0=16;L=2;d=10;dx=0.01;x=0:dx:L+d; m=1;hbar=2*m;n=length(x); pot=V(V0,n,d,L,x);EP=diag(pot); D2=toeplitz([-2 1 zeros(1,n-2)])/dx^2;H=-hbar/(2*m)*D2+EP; [V,E]=eig(H);en=diag(E); norm=sqrt(trapz(x',V.^2));V=V./norm; clc,clear all,close all V0=16;L=1;d=2;dx=0.01;xp=0:dx:L+d;n=15;if n < 2,x=xp;else, x(n,:)=xp;for i=1:n-1,x(n-i,:)=xp-(i)*(L+d); x(n+i,:)=xp+(i)*(L+d);end,end,pot=EpH(V0,n,d,L,x);x=x';x=x(:)'; pot=pot';pot=pot(:)';m=1;hbar=2*m;n=length(x);EP=diag(pot); D2=toeplitz([-2 1 zeros(1,n-2)])/dx^2;H=-hbar/(2*m)*D2+EP; [V,E]=eig(H);en=diag(E); norm=sqrt(trapz(x',V.^2));V=V./norm; % pr1k2.m clear all V0=20;L=.5;d=.5;l=L+d;En=1e-10:0.01:150+1e-15; k1=sqrt(2*En);k2=sqrt(2*(V0-En)); f=cos(k1*L).*cosh(k2*d)+((k2.^2-k1.^2)./(2*k1.*k2)).*... sin(k1*L).*sinh(k2*d); j=0;for i=1:length(En),if abs(f(i)) <= 1, j=j+1; Eperm(j)=En(i);K(j)=acos(f(i))/l;end,end,klpi1=l*K/pi; klpi2=-l*K/pi;plot(klpi1,Eperm,'k.',klpi2,Eperm,'k.'), xlabel('K(d+L)/\pi','FontSize',18), ylabel('Energia','FontSize',18)