Implicit ODR job.
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
integer | :: | i | ||||
integer | :: | info | ||||
integer | :: | j | ||||
integer | :: | job | ||||
integer | :: | lunerr | ||||
integer | :: | lunrpt | ||||
integer | :: | m | ||||
integer | :: | n | ||||
integer | :: | np | ||||
integer | :: | nq | ||||
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, info, j, job, lunerr, lunrpt, m, n, np, nq real(kind=wp), allocatable :: beta(:), x(:, :), y(:, :) ! Set up report files open (newunit=lunrpt, file='./example/report2.dat') lunerr = lunrpt ! Read problem dimensions open (unit=5, file='./example/data2.dat') read (5, fmt=*) n, m, np, nq ! Allocate arrays allocate (beta(np), x(n, m), y(n, nq)) ! Read problem data read (5, fmt=*) (beta(i), i=1, np) do i = 1, n read (5, fmt=*) (x(i, j), j=1, m) end do close (5) ! 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 ! Compute solution call odr(fcn=fcn, & n=n, m=m, np=np, nq=nq, & beta=beta, & y=y, x=x, & job=job, & lunerr=lunerr, lunrpt=lunrpt, & info=info) end program example2