HW2soln - TRANSFER MATRIX function T=Transmission(V,ks,b c=2.998e10%cm/s hbar=6.582e-16%in eV*sec m=5.11e5/c^2%in eV/c^2 dx=5e-9%for single barrier

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
function plot1Dtransmission m=5.6854e-16; hbar=6.582e-16; hb2o2m=3.8100e-16; global Ef Wf Ef=2; Wf=2; kf=sqrt(Ef/hb2o2m); global V; Vs=(1e-15:0.1:5); ii=1; for V=Vs %Octave syntax: %II(ii)=quad('integrand', real(sqrt(kf^2-V/hb2o2m)),kf); %Matlab syntax: II(ii)=quad(@integrand, real(sqrt(kf^2-V/hb2o2m)),kf); ii=ii+1; end plot([-fliplr(Vs) Vs],1e9*[- fliplr(II) II],'k'); xlabel('Voltage [V]') ylabel('Current [nA]') hold off; end %%%%%%%%%% SUBFUNCTIONS: function el=integrand(ks) m=5.11e5/(2.998e10)^2; hbar=6.582e-16; hb2o2m=hbar*hbar/(2.0*m); global Ef Wf V0=Wf+Ef; global V; kf=sqrt(Ef/hb2o2m); q=1.6e-19; ii=1; for k=ks T=Transmission(V,k,V0); el(ii)=q*hbar*k*T/(2*pi*m); ii=ii+1; end end %%%%%%%%%%%%%%%%%%%%%%%%
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % TRANSFER MATRIX function T=Transmission(V,ks,b) c=2.998e10;%cm/s hbar=6.582e-16; %in eV*sec m=5.11e5/c^2; %in eV/c^2 dx=5e-9; %for single barrier: interfaces=(0:10)*dx; Vs=[0 b-V* interfaces(1:(length(interfaces )-1))/(max(interfaces)-dx) -V]; %for double barrier (uncomment this): %Vs(4:9)=Vs(4:9)-b; ii=1; for k=ks E=(hbar^2*k^2)/(2*m); M=eye(2); for jj=1:length(interfaces) k1=sqrt(2*m*(E-Vs(jj)))/hbar; if jj==1 kL=k1; end k2=sqrt(2*m*(E-Vs(jj+1)))/hbar; if jj==length(interfaces) kR=k2; end M=M*[(k1+k2)/(2*k1)*exp(i*(k2-k1)*interfaces(jj)) (k1-k2)/(2*k1)*exp(-i*(k1+k2)*interfaces(jj)) ; (k1-k2)/(2*k1)*exp(i*(k1+k2)*interf aces(jj)) (k1+k2)/(2*k1)*exp(i*(k1-k2)*interfaces(jj)) ]; end T(ii)=real(kR/kL*(1/M(1,1))' *(1/M(1,1))); ii=ii+1; end end...
View Full Document

This note was uploaded on 12/29/2011 for the course PHYSICS 731 taught by Professor Appelbaum during the Fall '11 term at Maryland.

Page1 / 3

HW2soln - TRANSFER MATRIX function T=Transmission(V,ks,b c=2.998e10%cm/s hbar=6.582e-16%in eV*sec m=5.11e5/c^2%in eV/c^2 dx=5e-9%for single barrier

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online