h = [0.282, 0.564, 0.752, 0.940]
d = [0.752, 1.102, 1.248, 1.410]
using Plots
scatter(h,d)
plot!(xlim=(0,1.5),ylim=(0,2),
xlabel="Height",ylabel="Distance")
m = length(h)
A = [ones(m,1) h]
b = d
@show A
@show b
@show c = A\b
;
scatter(h,d,label="Galileo's data")
plot!(h, c[1]+c[2]*h, color="red", label="Best fit")
plot!(xlim=(0,1.5),ylim=(0,2),
xlabel="Height",ylabel="Distance")