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

  1. /*
  2.  *    MATTEST6
  3.  *
  4.  *    Simple program that illustrates how to call the MAT-file Library
  5.  *    from a C program.  
  6.  *
  7.  *    The example writes the string, "Hello, world", into a MAT-file.
  8.  *    The matrix is named, "A", and the MAT-file is named, "foo.mat".
  9.  *    
  10.  */
  11. #include "mat.h"
  12.  
  13. main()
  14. {
  15.     MATFile *fp;
  16.  
  17.     fp = matOpen("foo.mat", "w");
  18.     matPutString(fp, "A", "Hello, world");
  19.     matClose(fp);
  20.     exit(0);
  21. }
  22.