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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top