Fitting a straight line.
More...
|
interface | linfit |
| Fits a straight line to input data by minimizing chi^2. More...
|
|
|
real(dp) function, dimension(:), allocatable | linfit_dp (x, y, a, b, siga, sigb, chi2, model2) |
|
real(sp) function, dimension(:), allocatable | linfit_sp (x, y, a, b, siga, sigb, chi2, model2) |
|
Fitting a straight line.
This module provides a routine to fit a straight line with model I or model II regression.
- Authors
- Matthias Cuntz
- Date
- Mar 2011
- Copyright
- Copyright 2005-2024, the CHS Developers, Sabine Attinger: All rights reserved. FORCES is released under the LGPLv3+ license
The UFZ (CHS) FORCES code is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the free Software Foundation either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You received a copy of the GNU Lesser General Public License along with the UFZ CHS FORCES code. It can be found in the files COPYING
and COPYING.LESSER
provided with this software. The complete GNU license text can also be found at http://www.gnu.org/licenses/.
◆ linfit_dp()
real(dp) function, dimension(:), allocatable mo_linfit::linfit_dp |
( |
real(dp), dimension(:), intent(in) |
x, |
|
|
real(dp), dimension(:), intent(in) |
y, |
|
|
real(dp), intent(out), optional |
a, |
|
|
real(dp), intent(out), optional |
b, |
|
|
real(dp), intent(out), optional |
siga, |
|
|
real(dp), intent(out), optional |
sigb, |
|
|
real(dp), intent(out), optional |
chi2, |
|
|
logical, intent(in), optional |
model2 |
|
) |
| |
|
private |
◆ linfit_sp()
real(sp) function, dimension(:), allocatable mo_linfit::linfit_sp |
( |
real(sp), dimension(:), intent(in) |
x, |
|
|
real(sp), dimension(:), intent(in) |
y, |
|
|
real(sp), intent(out), optional |
a, |
|
|
real(sp), intent(out), optional |
b, |
|
|
real(sp), intent(out), optional |
siga, |
|
|
real(sp), intent(out), optional |
sigb, |
|
|
real(sp), intent(out), optional |
chi2, |
|
|
logical, intent(in), optional |
model2 |
|
) |
| |
|
private |