org.opensourcephysics.numerics
Class CurveFitting

java.lang.Object
  extended by org.opensourcephysics.numerics.CurveFitting

public class CurveFitting
extends java.lang.Object

Class CurveFitting defines various curve fitting algorithms inluding linear regression. This class cannot be subclassed or instantiated because all methods are static.

Author:
Wolfgang Christian

Method Summary
static Function linearRegression(double[] xpoints, double[] ypoints)
          Computes the linear regression for the given data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

linearRegression

public static Function linearRegression(double[] xpoints,
                                        double[] ypoints)
Computes the linear regression for the given data.

Parameters:
xpoints - double[]
ypoints - double[]
Returns:
Function the linear regression function