Skip to content

Instantly share code, notes, and snippets.

@scemama
Created January 26, 2015 09:37
Show Gist options
  • Save scemama/31029680262174329e38 to your computer and use it in GitHub Desktop.
Save scemama/31029680262174329e38 to your computer and use it in GitHub Desktop.
Create a random matrix
subroutine create_random_matrix(m,n,A,LDA)
implicit none
integer, intent(in) :: m,n
integer, intent(in) :: LDA
double precision, intent(out) :: A(LDA,n)
integer :: i,j
do j=1,n
do i=1,m
call random_number( A(i,j) )
enddo
enddo
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment