diff options
| author | e78783 <fungcheokyin@gmail.com> | 2022-05-17 20:48:22 +0800 |
|---|---|---|
| committer | e78783 <fungcheokyin@gmail.com> | 2022-05-17 20:48:22 +0800 |
| commit | a473815e35238a5fad16bcb4882662a8f26cb880 (patch) | |
| tree | 5cfc93ffd5ab596729a9ecbbcf8d870bda5afafe | |
| parent | 57810dc9b1ff8993050bc5e19474d915d47d0d6e (diff) | |
| download | perlweeklychallenge-club-a473815e35238a5fad16bcb4882662a8f26cb880.tar.gz perlweeklychallenge-club-a473815e35238a5fad16bcb4882662a8f26cb880.tar.bz2 perlweeklychallenge-club-a473815e35238a5fad16bcb4882662a8f26cb880.zip | |
ratio
| -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") |
