Skip to content

Commit e50c8b6

Browse files
Vexatosleios
authored andcommitted
Fixed printing of the Thomas Algorithm implementation in Julia (#528)
1 parent f3f28b9 commit e50c8b6

File tree

1 file changed

+7
-6
lines changed
  • contents/thomas_algorithm/code/julia

1 file changed

+7
-6
lines changed

contents/thomas_algorithm/code/julia/thomas.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ function main()
3030
c = [4.0, 5.0, 0.0]
3131
d = [7.0, 5.0, 3.0]
3232

33-
println("The system,")
34-
println(a)
35-
println(b)
36-
println(c)
37-
println(d)
38-
println("Has the solution:")
33+
println(
34+
"""The system
35+
$(join((b[1], c[1], "", "|", d[1]), "\t"))
36+
$(join((a[2], b[2], c[2], "|", d[2]), "\t"))
37+
$(join(("", a[3], b[3], "|", d[3]), "\t"))
38+
Has the solution:"""
39+
)
3940

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

0 commit comments

Comments
 (0)