Menu

HandleOutputFiles

Nobuyuki MATUBAYASI

Handling output files

I want to read correlation matrix directly.

The correlation matrix in this question means a corref.xx file.
Use the following fortran program to read the matrix.

program main
  integer, parameter :: d = 1396
  real(8) :: x(d, d)
  integer :: i, j
  open (unit = 10, file = "corref.01", form = "UNFORMATTED", action = "read", status = "OLD")
  read (unit = 10) x(:, :)
  do i = 1, d
    do j = 1, d
      print *, x(i, j)
    end do
  end do
end program main

In the above program, the parameter d in the second line is the dimension of histogram.
It can be measured by e.g. "wc -l engref.01"


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.