powered by
The function simulates a falling object's position. Default parameters are for dropping a weight from the tower of Pisa.
rfalling_object( n = 14, d_0 = 55.86, v_0 = 0, g = -9.8, scale = 1, time = seq(0, 3.25, length.out = n), error_distribution = c("rnorm", "rt"), df = 3 )
A data.frame with the time, the distance travelled, and the observed distance.
data.frame
Sample size
Height from which object will fall in meters.
Initial velocity with which object will fall in meters per second.
Gravitational constant, 9.8 meters per second per seonnd
The measurement errors will be multiplied by this constant.
Numeric vector of times, in seconds, at which measurements were taken.
Character. Either rnorm for normal or rt for t-distribution.
rnorm
rt
If using t-distribution, the degrees of freedom.
dat <- rfalling_object() with(dat, plot(time, observed_distance)) with(dat, lines(time, distance, col = "blue"))
Run the code above in your browser using DataLab