1MAT_OPEN(3)              BSD Library Functions Manual              MAT_OPEN(3)
2

NAME

4     Mat_Open — Open a MATLAB .mat file
5

SYNOPSIS

7     #include <matio.h>
8
9     mat_t
10     Mat_Open(const char *matname, int mode);
11

DESCRIPTION

13     The Mat_Open() function opens a MATLAB .mat file for read only or read-
14     write access.
15

EXAMPLES

17     #include <stdlib.h>
18     #include <stdio.h>
19     #include "matio.h"
20
21     int main(int argc,char **argv)
22     {
23         mat_t *matfp;
24
25         matfp = Mat_Open(argv[1],MAT_ACC_RDONLY);
26         if ( NULL == matfp ) {
27             fprintf(stderr,"Error opening MAT file %s0,argv[1]);
28             return EXIT_FAILURE;
29         }
30
31         Mat_Close(matfp);
32         return EXIT_SUCCESS;
33     }
34
35

SEE ALSO

37     Mat_Create(3), Mat_CreateVer(3), Mat_Close(3)
38
39BSD                             April 21, 2011                             BSD
Impressum