reading the number of unknown rows and columns

K

k_baum217

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


Any help would be greatly appreciated. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top