zeye_matrix Function

pure function zeye_matrix(n) result(A)

Arguments

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

Return Value complex(kind=8), (n,n)


Source Code

pure function zeye_matrix(n) result(A)
  integer, intent(in) :: n
  complex(8)          :: A(n, n)
  integer             :: i
  A = zero
  do i = 1, n
     A(i,i) = one
  end do
end function zeye_matrix