mat_rset Subroutine

public subroutine mat_rset(n, dx, dy, incy)

Arguments

Type IntentOptional Attributes Name
integer :: n
doubleprecision :: dx
doubleprecision :: dy(*)
integer :: incy

Source Code

subroutine mat_rset(n,dx,dy,incy)

! ident_28="@(#)M_LA::mat_rset(3f): copies a scalar, dx, to a vector, dy."

integer         :: n
doubleprecision :: dx,dy(*)
integer         :: incy
integer         :: i
integer         :: iy

   if (n.gt.0) then
      iy = 1
      if (incy.lt.0) iy = (-n+1)*incy + 1
      do i = 1,n
         dy(iy) = dx
         iy = iy + incy
      enddo
   endif
end subroutine mat_rset