powered by
Solve method, for chs objects.
# S3 method for chs solve(a, b, …, to.list=FALSE)
A chs object.
A vector of y values.
If true, return list. Ignored, if b has length two or greater.
Other arguments, for the roots.chs.eval function.
If to.list is false (the default), and length (b) is one: It returns a single numeric vector.
Otherwise: It returns a list of numeric vectors, one for each value in b.
This function is a wrapper for roots.chs.eval. (It calls roots.chs.eval with modified cy values).
It computes x values, where the spline's y value is equal to the values in b.
Please refer to the help page for chs for background information and references.
chs, roots.chs
# NOT RUN { #control points cx <- 1:4 cy <- c (-4, -1, 1, 4) #cubic hermite spline #(with function object, and default slopes) f <- chs (cx, cy) #solve for x, given y=2 solve (f, 2) # }
Run the code above in your browser using DataLab