Skip to content

Fixed printing of the Thomas Algorithm implementation in Julia #528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions contents/thomas_algorithm/code/julia/thomas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ function main()
c = [4.0, 5.0, 0.0]
d = [7.0, 5.0, 3.0]

println("The system,")
println(a)
println(b)
println(c)
println(d)
println("Has the solution:")
println(
"""The system
$(join((b[1], c[1], "", "|", d[1]), "\t"))
$(join((a[2], b[2], c[2], "|", d[2]), "\t"))
$(join(("", a[3], b[3], "|", d[3]), "\t"))
Has the solution:"""
)

soln = thomas(a, b, c, d, 3)

Expand Down