ECE 453 Assignment 4 Solutions[1]

ECE 453 Assignment 4 Solutions[1] - ECE 453 Assignment 4...

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

View Full Document Right Arrow Icon
ECE 453 Assignment 4
Background image of page 1

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

View Full DocumentRight Arrow Icon
Problem 2 clear all hbar=1.06e-34;m=9.11e-31;q=1.602e-19; N=100; % Number of lattice points a=1e-10; % lattice constant L=a*(N+1); % The length of the Box % we set psi_0=0 and psi_(N+1)=0 t0=hbar^2/(2*m*a^2); % t0 value %Now construct the H matrix H=2*t0.*diag(ones(1,N))-t0.*diag(ones(1,N-1),1)-t0.*diag(ones(1,N-1),-1); % The Hamiltonian %H(1,N)=-t0;H(N,1)=-t0; % Periodic boundary condition [V,D]=eig(H); % V is the eigenvectors [E_numerical,ind]=sort(diag(D)); % The eigenvalues after sorting % ind stores the index before sorting E_analytic=hbar^2*pi^2/(2*m*L^2)*[1:N].*[1:N]; h=plot(E_numerical/q, 'rx' ) %plot in eV unit hold on h=plot(E_analytic/q, 'b-' ) % plot in eV unit psi1=V(:,ind(1)); % the wave function corresponding to lowest eigenvalue psi2=V(:,ind(50)); % The probability % P1=psi1.*conj(psi1); % P2=psi2.*conj(psi2); % pro=plot(P1,'gx') % plot the probability for psi1 % hold on % pro=plot(P2,'r-') % plot the probability for psi2
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/29/2010 for the course ECE 453 taught by Professor Supriyodatta during the Spring '10 term at Purdue.

Page1 / 5

ECE 453 Assignment 4 Solutions[1] - ECE 453 Assignment 4...

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