From a473815e35238a5fad16bcb4882662a8f26cb880 Mon Sep 17 00:00:00 2001 From: e78783 Date: Tue, 17 May 2022 20:48:22 +0800 Subject: ratio --- challenge-165/cheok-yin-fung/julia/ch-2.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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") -- cgit