Simulate falling object data
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 )
n |
Sample size |
d_0 |
Height from which object will fall in meters. |
v_0 |
Initial velocity with which object will fall in meters per second. |
g |
Gravitational constant, 9.8 meters per second per seonnd |
scale |
The measurement errors will be multiplied by this constant. |
time |
Numeric vector of times, in seconds, at which measurements were taken. |
error_distribution |
Character. Either |
df |
If using t-distribution, the degrees of freedom. |
A data.frame
with the time, the distance travelled, and the observed distance.
dat <- rfalling_object() with(dat, plot(time, observed_distance)) with(dat, lines(time, distance, col = "blue"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.