Implicit ODR job.
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
integer | :: | i | ||||
integer | :: | iprint | ||||
integer | :: | j | ||||
integer | :: | job | ||||
integer | :: | lundata | ||||
integer | :: | lunrpt | ||||
integer | :: | m | ||||
integer | :: | n | ||||
integer | :: | np | ||||
integer | :: | q | ||||
real(kind=wp), | allocatable | :: | beta(:) | |||
real(kind=wp), | allocatable | :: | x(:,:) | |||
real(kind=wp), | allocatable | :: | y(:,:) |
program example2 !! Implicit ODR job. use odrpack, only: odr use odrpack_kinds, only: wp use example2_model, only: fcn implicit none ! Variable declarations integer :: i, iprint, j, job, lundata, lunrpt, m, n, np, q real(kind=wp), allocatable :: beta(:), x(:, :), y(:, :) ! Set up report files open (newunit=lunrpt, file='./example/report2.dat') ! Read problem dimensions open (newunit=lundata, file='./example/data2.dat') read (lundata, fmt=*) n, m, np, q ! Allocate arrays allocate (beta(np), x(n, m), y(n, q)) ! Read problem data read (lundata, fmt=*) (beta(i), i=1, np) do i = 1, n read (lundata, fmt=*) (x(i, j), j=1, m) end do close (lundata) ! Specify task: Implicit orthogonal distance regression ! With forward finite difference derivatives ! Covariance matrix constructed with recomputed derivatives ! DELTA initialized to zero ! Not a restart job = 00001 iprint = 2002 ! Compute solution call odr(fcn, n, m, q, np, beta, y, x, & job=job, lunerr=lunrpt, lunrpt=lunrpt, iprint=iprint) close (lunrpt) end program example2