Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed printing of the Thomas Algorithm implementation in Julia
  • Loading branch information
Vexatos committed Oct 20, 2018
commit 154efab9e7f1c9a48ae0e4e0efecad679da36066
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