home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / SRC.DI$ / MATTEST3.F < prev    next >
Encoding:
Text File  |  1993-03-26  |  589 b   |  27 lines

  1. c
  2. c    MATTEST3
  3. c
  4. c    Simple program that illustrates how to call the MAT-file Library
  5. c    from a Fortran program.  
  6. c
  7. c    The example prints out the row dimensions of all the Matrices in
  8. c    a MAT-file.
  9. c    
  10.       program main
  11.       integer matOpen, matClose, mxGetM, matGetNextMatrix
  12.       integer mp, fp, stat
  13. c
  14.       fp = matOpen('foo.mat', 'r')
  15.       do 10 i=1,1000
  16.          mp = matGetNextMatrix(fp)
  17.          if (mp .eq. 0) then
  18.             go to 20
  19.          end if
  20.          write(6,*) 'Row dimension is ',mxGetM(mp)
  21.    10 continue
  22.    20 continue
  23.       stat = matClose(fp)
  24. c
  25.       stop
  26.       end
  27.