Help about I/O in Vax Fortran. 
Author Message
 Help about I/O in Vax Fortran.

In a fortran program, there's a part for reading in an unformated data file,
and creating a 3-D matrix. s
My questions are:
1. When  "READ (UNIT=2)
ARRAY" is applied in the following program, how it creats a 64x64x128 3-D
matrix in the following example code?
2. Now, I have an unformated data file
which is for a 2-D matrix, I don't how to read it in and form a 256x256x1
matrix so that this unformated data file can be accessed by the example code
shown in the following.

The relative part in the example code is:

        PROGRAM VIEWPLOT

        DIMENSION       ARRAY(IDIM,JDIM,KDIM)

        OPEN(UNIT=2,NAME=FILE,STATUS='OLD',FORM='UNFORMATTED')
        READ(UNIT=2) ARRAY,PARAM
        CLOSE(UNIT=2)

C Call display of xy plane
                CALL DISXY(ARRAY,ARRAY1,IDIM,JDIM,KDIM,XMIN,DX,YMIN,DY,IOP,XISO,
     1            ISO,ITYP,IVIEW,VT100,SSD,RMAX,SCAL)

.....................

        END

        SUBROUTINE DISXY(ARRAY,ARRAY1,IDIM,JDIM,KDIM,XMIN,DX,YMIN,DY,
     *    IOP,XISO,ISO,ITYP,IVIEW,VT100,SSD,RMAX,SCAL)

        DIMENSION       ARRAY(IDIM,JDIM,KDIM),ARRAY1(IDIM,JDIM)

c Determine minimum and maximum vallues for plane selected.
        RMIN=ARRAY(1,1,IOP)
        RMAX=RMIN
        DO 100 J=1,JDIM
        DO 100 I=1,IDIM
                DUMMY=ARRAY(I,J,IOP)
        IF(RMIN.GT.DUMMY) RMIN=DUMMY
        IF(RMAX.LT.DUMMY) RMAX=DUMMY
        ARRAY1(I,J)=DUMMY
100     CONTINUE

Thank you for reading this long,probally unclear posting.

*I might see sun rise tomorrow.*

--

Postdoct{*filter*}Fellow                 phone : (416) 924 - 4501 x5360
Clinical Physics                    FAX   : (416) 926 - 6566
Ontario Cancer Institute  Toronto, ON. Canada  M4X 1K9



Sat, 30 Nov 1996 09:09:16 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. non-VAX VAX FORTRAN compiler

2. Anyone for help with DEC (Vax) Fortran-IV ?

3. Need help linking Ada code to Fortran on VAX/VMS

4. Help w/ Vax program on MS FORTRAN

5. Help needed for VAX fortran

6. Help: Migrating Fortran Applications from VAX to Win95

7. NEED HELP IN VAX/VMS FORTRAN SCREEN INTERFACE

8. Help sought for VAX FORTRAN indexed files

9. looking for help with PC to VAX fortran

10. Migrating Vax Fortran to Visual Fortran

11. VAX Fortran to Digital Visual Fortran

12. Converting fro Vax fortran to Unix or PC based Fortran

 

 
Powered by phpBB® Forum Software