PetscLinearRegression#
Gives the best least-squares linear fit to some x-y data points
Synopsis#
PetscErrorCode PetscLinearRegression(PetscInt n, const PetscReal x[], const PetscReal y[], PetscReal *slope, PetscReal *intercept)
Input Parameters#
- n - The number of points 
- x - The x-values 
- y - The y-values 
Output Parameters#
- slope - The slope of the best-fit line 
- intercept - The y-intercept of the best-fit line 
See Also#
Level#
intermediate
Location#
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages