home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / SRC.DI$ / MATTEST5.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-26  |  463 b   |  25 lines

  1. /*
  2.  *    MATTEST5
  3.  *
  4.  *    Simple program that illustrates how to call the MAT-file Library
  5.  *    from a C program.  
  6.  *
  7.  *    The example writes a simple 3-by-2 real matrix into a MAT-file.
  8.  *    The matrix is named, "A", and the MAT-file is named, "foo.mat".
  9.  *    
  10.  */
  11. #include <stdlib.h>
  12. #include "mat.h"
  13.  
  14. static double Areal[6] = { 1, 2, 3, 4, 5, 6 };
  15.  
  16. main()
  17. {
  18.     MATFile *fp;
  19.  
  20.     fp = matOpen("foo.mat", "w");
  21.     matPutFull(fp, "A", 3, 2, Areal, NULL);
  22.     matClose(fp);
  23.     exit(0);
  24. }
  25.