dsetn Subroutine

public pure subroutine dsetn(n, m, x, ldx, nrow)

Uses

  • proc~~dsetn~~UsesGraph proc~dsetn dsetn module~odrpack_kinds odrpack_kinds proc~dsetn->module~odrpack_kinds iso_fortran_env iso_fortran_env module~odrpack_kinds->iso_fortran_env

Select the row at which the derivative will be checked.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

The number of observations.

integer, intent(in) :: m

The number of columns of data in the independent variable.

real(kind=wp), intent(in) :: x(ldx,m)

The independent variable.

integer, intent(in) :: ldx

The leading dimension of array x.

integer, intent(inout) :: nrow

The selected row number of the independent variable.


Called by

proc~~dsetn~~CalledByGraph proc~dsetn dsetn proc~doddrv doddrv proc~doddrv->proc~dsetn proc~dodcnt dodcnt proc~dodcnt->proc~doddrv proc~odr odr proc~odr->proc~dodcnt proc~odr_long_c odr_long_c proc~odr_long_c->proc~odr proc~odr_medium_c odr_medium_c proc~odr_medium_c->proc~odr proc~odr_short_c odr_short_c proc~odr_short_c->proc~odr program~example1 example1 program~example1->proc~odr program~example2 example2 program~example2->proc~odr program~example3 example3 program~example3->proc~odr program~example4 example4 program~example4->proc~odr program~example5 example5 program~example5->proc~odr

Variables

Type Visibility Attributes Name Initial
integer, public :: i

Source Code

   pure subroutine dsetn(n, m, x, ldx, nrow)
   !! Select the row at which the derivative will be checked.
      ! Routines Called  (None)
      ! Date Written   860529   (YYMMDD)
      ! Revision Date  920304   (YYMMDD)

      use odrpack_kinds, only: zero

      integer, intent(in) :: n
         !! The number of observations.
      integer, intent(in) :: m
         !! The number of columns of data in the independent variable.
      real(wp), intent(in) :: x(ldx, m)
         !! The independent variable.
      integer, intent(in) :: ldx
         !! The leading dimension of array `x`.
      integer, intent(inout) :: nrow
         !! The selected row number of the independent variable.

      ! Local scalars
      integer :: i

      ! Variable Definitions (alphabetically)
      !  I:       An index variable.
      !  J:       An index variable.
      !  LDX:     The leading dimension of array X.
      !  M:       The number of columns of data in the independent variable.
      !  N:       The number of observations.
      !  NROW:    The selected row number of the independent variable.
      !  X:       The independent variable.

      if ((nrow >= 1) .and. (nrow <= n)) return

      ! Select first row of independent variables which contains no zeros
      ! if there is one, otherwise first row is used.
      nrow = 1
      do i = 1, n
         if (all(x(i, :) /= zero)) then
            nrow = i
            return
         end if
      end do

   end subroutine dsetn