Skip to content

Commit 29eee0d

Browse files
committed
Add transition sentence between Hamiltonian print and plot
1 parent ef6fbfd commit 29eee0d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

docs/src/tutorial-goddard.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,11 @@ println(" H variation: max|H(t) - H(t0)| = ", maximum(abs.(H_direct .- H_direct
548548
println("\nIndirect method:")
549549
println(" H(t0) = ", H_indirect[1])
550550
println(" H variation: max|H(t) - H(t0)| = ", maximum(abs.(H_indirect .- H_indirect[1])))
551+
```
552+
553+
We can also plot the Hamiltonian along the trajectory to verify its constancy visually.
551554

555+
```@example main-goddard
552556
# Plot
553557
plot(t_dir, H_direct, label="Direct", linewidth=2)
554558
plot!(t_ind, H_indirect, label="Indirect", linewidth=2, linestyle=:dash)

0 commit comments

Comments
 (0)