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

  1. c
  2. c    MATTEST5
  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 writes a simple 3-by-2 real matrix into a MAT-file.
  8. c    The matrix is named, 'A', and the MAT-file is named, 'foo.mat'.
  9. c    
  10.       program main
  11.       integer matOpen, matClose, matPutFull
  12.       integer mf, stat
  13.       double precision Areal(6)
  14.       double precision Aimag(6)
  15.       data Areal / 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 /
  16.       data Aimag / 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 /
  17. c
  18.       mf = matOpen('foo.mat', 'w')
  19.       stat = matPutFull(mf, 'A', 3, 2, Areal, Aimag)
  20.       stat = matClose(mf)
  21. c
  22.       stop
  23.       end
  24.