⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linregress.cwp.lib

📁 su 的源代码库
💻 LIB
字号:
LINEAR_REGRESSION - Compute linear regression of (y1,y2,...,yn) against (x1,x2,...,xn)Function Prototype:void linear_regression(float *y, float *x, int n, float coeff[4]);Input:y		array of y valuesx		array of x valuesn		length of y and x arraysOutput:coeff[4] where:coeff[0]	slope of best fit linecoeff[1]	intercept of best fit linecoeff[2]	correlation coefficient of fit (1 = perfect) [dimensionless]coeff[3]	standard error of fit (0 = perfect) [dimensions of y]Notes: y(x)     |      *  .    fit is  y(x) = a x + b    |       .              |     .  *    | * .        | . *              ------------------- x              n Sum[x*y] - Sum[x]*Sum[y]     a = --------------------------         n Sum[x*x] - Sum[x]*Sum[x]                  Sum[y] - a*Sum[x]     b = -----------------                n         cc = std definition          se = std definition    Author:  Chris Liner, UTulsa, 11/16/03                

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -