This preview shows page 1. Sign up to view the full content.
Unformatted text preview: for j = 1:x_d for k = -1000:1000 if(k~=0) % evaluating the case when $k = 0$. sum_t(j) = sum_t(j) + ((-1)^k)/k*exp(1i*(k*x(j) +k^2*t)); end end end %For loop to compute the final solution. for k = 1:x_d result(k) = (1/(2*pi*1i))*sum_t(k); end plot(x,real(result));% Plot the solution xlabel('x','FontSize',14); % Labeling the x axis ylabel('\psi(t,x)','FontSize',16);% Labeling the y axis title('Solution to the Schrodinger wave equation ','FontSize',16); % Providing the title to the graph. end...
View Full Document
This note was uploaded on 11/19/2011 for the course MATH 101 taught by Professor Wormer during the Spring '08 term at UCSD.
- Spring '08