gpoly

package
v0.0.0-...-f3abbe6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PolyAngle

func PolyAngle(ys []float64) float64

等间距离散点拟合直线的夹角

func PolyFit

func PolyFit(xs, ys []float64, degree int) []float64

多项式曲线拟合函数,也就是离散点拟合直线 xs: 横坐标值 ys:纵坐标值 degree:拟合多项式的次数 输出:degree次拟合多项式系数(coefficients),其长度=degree+1,第一个值就是斜率,后面的值是截距误差。若要计算多项式在横坐标上的值,还要继续调用函数PolyVal

func PolyVal

func PolyVal(xs []float64, coefficients []float64) []float64

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL