aboutsummaryrefslogtreecommitdiff
path: root/hw8/10-17.jl
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2024-05-07 18:34:59 -0400
committersotech117 <michael_foiani@brown.edu>2024-05-07 18:34:59 -0400
commit5d7a9ddfc13d8eec746005fad54cabaca15c6449 (patch)
tree8759d8e20bcb2255b531838a8bb04c478c793477 /hw8/10-17.jl
parentbc515d3acdd94847b6e7aa6135bc234b46161db6 (diff)
finish hw8, the last hw
Diffstat (limited to 'hw8/10-17.jl')
-rw-r--r--hw8/10-17.jl4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw8/10-17.jl b/hw8/10-17.jl
index d1d18b7..6690d1f 100644
--- a/hw8/10-17.jl
+++ b/hw8/10-17.jl
@@ -16,7 +16,9 @@ function H(psi, dx, k = 0, width = 0.1) # action of Hamiltonian on wavefunction
for i in 1:length(psi)
x = i * dx
if x >= 30.0 && x <= 30.0 + width
- Hpsi[i] = 2 * k^2 * psi[i]
+ Hpsi[i] += 2 * k^2
+ # else
+ # Hpsi[i] += -0.01
end
end