hyperbolaSim: Simulate hyperbola

View source: R/hyperbola.R

hyperbolaSimR Documentation

Simulate hyperbola

Description

Return the time values of the hyperbola as a function of the position values x.

Usage

hyperbolaSim(x, hyp)

Arguments

x

[numeric] The horitzontal positions at which to compute the hyperbola values.

hyp

[list|class hyperbola] Either a list with elements x0, t0, and vrms corresponding to the coordinates of the hyperbola vertex and the root-mean-square velocity, or a list of class hyperbola (i.e., the output of the function hyperbolaFit). y = NULL)

[\code{numeric}]

The time values of the hyperbola.

See Also

hyperbolaSim, hyperbolaPlot

Examples


xy <- list( x = c( 11.8,  15.0,  17.7, 20.3, 24.4,  27.4,  30.9,  35.2),
            y = c(142.2, 119.8, 107.7, 99.5, 97.5, 105.6, 120.9, 138.1))
hyp <- hyperbolaFit(xy)

x <- seq(10, 40, by = 0.1)
y <- hyperbolaSim(x, hyp) 
plot(x, y, type = "l", ylim = rev(range(y)))   

hyp2 <- list(x0 = hyp$x0, t0 = hyp$t0, vrms = hyp$vrms)  
y <- hyperbolaSim(x, hyp) 
plot(x, y, type = "l", ylim = rev(range(y)))  

emanuelhuber/RGPR documentation built on May 13, 2024, 9:31 p.m.