I'm new to fortran 90 and I need a code which will read the number of rows and columns of a matrix of dimensions n x m.
I understand how to get the number of rows, but can't figure out how to find the number of columns. This is part of the program which will find the number of rows, n:
DO
READ(13,*, iostat = error)
IF (error == -1) EXIT
n = n + 1
END DO
I'm thinking I need some form of nested do-loop, but I'm not sure how to set it up. Any help would be greatly appreciated. Thanks
I understand how to get the number of rows, but can't figure out how to find the number of columns. This is part of the program which will find the number of rows, n:
DO
READ(13,*, iostat = error)
IF (error == -1) EXIT
n = n + 1
END DO
I'm thinking I need some form of nested do-loop, but I'm not sure how to set it up. Any help would be greatly appreciated. Thanks