| VF_linregress | VD_linregress | VE_linregress |
|
| Function | Linear regression |
|
| Syntax C/C++ | #include <VFstd.h>
void VF_linregress( fVector Param, fVector X, fVector Y, ui size ); |
| C++ VecObj | #include <OptiVec.h>
void vector<T>::linregress( const vector<T>& X, const vector<T>& Y ); |
| Pascal/Delphi | uses VFstd;
procedure VF_linregress( Param, X, Y:fVector; size:UInt ); |
|
| Description | The X-Y data are fitted to a straight line y = ax + b; the parameters a and b are determined in such a way that the quantity
h2 = sum( (Yi - y(x=Xi) )2 )
is minimized. Uncertainties da and db are also determined. On output, Param is filled with the 5 elements {a, da, b, db, h2} in the order indicated. |
|
|
|
|