1MAT_CLOSE(3) BSD Library Functions Manual MAT_CLOSE(3)
2
4 Mat_Close — Closes an open MATLAB MAT file.
5
7 #include <matio.h>
8
9 int
10 Mat_Close(mat_t *matfp);
11
13 The Mat_Close() function closes a MATLAB MAT file opened with Mat_Open()
14 or created with Mat_CreateVer().
15
17 The function returns 0 on success. Otherwise, an error value is
18 returned.
19
21 #include "matio.h"
22
23 int main(int argc, char **argv)
24 {
25 mat_t *matfp;
26
27 matfp = Mat_Open(argv[1], MAT_ACC_RDONLY);
28 if ( NULL == matfp ) {
29 fprintf(stderr, "Error opening MAT file %s0, argv[1]);
30 return EXIT_FAILURE;
31 }
32
33 Mat_Close(matfp);
34 return EXIT_SUCCESS;
35 }
36
37
39 Mat_Open(3), Mat_CreateVer(3)
40
41BSD September 12, 2019 BSD