linfit Subroutine

public subroutine linfit(x, y, slope, const)

Compute a linear fit for the given data, return the slope and the constant term. dgels from LAPACK solves the linear least squares problem.

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(in), dimension(:):: x

Values to be fitted.

real(kind=dp), intent(in), dimension(:):: y

Values to be fitted.

real(kind=dp), intent(inout) :: slope

\(a\) in \(y=ax+b\).

real(kind=dp), intent(inout) :: const

\(b\) in \(y=ax+b\).


Calls

proc~~linfit~~CallsGraph proc~linfit linfit dgels dgels proc~linfit->dgels

Contents

None