get_evals: Evaluate a curve on a grid

View source: R/get_evals.R

get_evalsR Documentation

Evaluate a curve on a grid

Description

Evaluate a curve on a grid

Usage

get_evals(curve, t_grid = NULL, ...)

## S3 method for class 'data.frame'
get_evals(curve, t_grid = NULL, ...)

## S3 method for class 'elastic_mean'
get_evals(curve, t_grid = NULL, centering = TRUE, ...)

Arguments

curve

a one parameter function which is to be evaluated on a grid

t_grid

the curve is evaluated at the values in t_grid, first value needs to be 0, last value needs to be 1. If t_grid = NULL, a default regular grid with grid length 0.01 is chosen

...

other arguments

centering

TRUE if curves shall be centered

Value

a data.frame with evaluations of the curve at the values in t_grid in its rows.

Examples

curve <- function(t){c(t*sin(10*t), t*cos(10*t))}
plot(get_evals(curve), type = "b")

elasdics documentation built on June 22, 2024, 12:27 p.m.

Related to get_evals in elasdics...