# projectile times = c(0, 0.0244, 0.0489, 0.0734, 0.0979, 0.1226, 0.1472, 0.1719, 0.1966, 0.2214, 0.2462, 0.271, 0.2959, 0.3208, 0.3457, 0.3707, 0.3957, 0.4207, 0.4459) heights = c(0, 0.0667, 0.1207, 0.168, 0.2088, 0.2365, 0.2624, 0.282, 0.2955, 0.3029, 0.3044, 0.2977, 0.2874, 0.27, 0.2451, 0.2198, 0.1857, 0.1413, 0.0875) proj = data.frame(times, heights) # # plot data plot(proj$time, proj$heights, main="Projectile Data", xlab="time (s)", ylab="height (m)") # # make a "quadratic" model proj_fit_1 = lm(proj$heights ~ proj$times + I(proj$times^2)) summary(proj_fit_1) # # isolating the parameters y0 = proj_fit_1$coefficients["(Intercept)"] v0 = proj_fit_1$coefficients["proj$times"] a = 2*proj_fit_1$coefficients["I(proj$times^2)"] y0 v0 a