lin2 {inflection} | R Documentation |
Linear function defined from two planar points (x1,y1) and (x2,y2)
Description
It gives the value of the linear function defined from two points (x1,y1) and (x2,y2) at any x
Usage
lin2(x1, y1, x2, y2, x)
Arguments
x1 |
the x - abscissa of the first point |
y1 |
the y - ordinate of the first point |
x2 |
the x - abscissa of the second point |
y2 |
the y - ordinate of the second point |
x |
the x - point where we compute the value of the linear function |
Value
It returns the value of the linear function from (x1,y1) to (x2,y2) at an arbitrary x.
Note
The value of a linear function is built by this way for R to be faster than a two-vectors call.
Author(s)
Demetris T. Christopoulos.
Examples
x1<-1
y1<-3
x2<-5
y2<-7
x<-10
ylin<-lin2(x1,y1,x2,y2,x)
print(ylin)
[Package inflection version 1.3.6 Index]