diff options
| -rw-r--r-- | challenge-165/cheok-yin-fung/julia/ch-2.jl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/challenge-165/cheok-yin-fung/julia/ch-2.jl b/challenge-165/cheok-yin-fung/julia/ch-2.jl index bd0113f50d..f29f55ae76 100644 --- a/challenge-165/cheok-yin-fung/julia/ch-2.jl +++ b/challenge-165/cheok-yin-fung/julia/ch-2.jl @@ -76,6 +76,10 @@ A = convert(Matrix{Float64}, hcat(xs, ones(length(xs)))) slope, intercept = inv(transpose(A)*A)*transpose(A) * ys -plot!(x -> slope*x + intercept, legend = :none) +plot!( + x -> slope*x + intercept, + legend = :none, +# ratio = 1, #optional +) savefig("new_julia.svg") |
