Mat_Open(3) Open a MATLAB .mat file

SYNOPSIS

Fd #include <matio.h> Ft mat_t Fo Mat_Open Fa const char *matname Fa int mode Fc

DESCRIPTION

The Fn Mat_Open function opens a MATLAB .mat file for read only or read-write access.

EXAMPLES

#include <stdlib.h>
#include <stdio.h>
#include "matio.h"
int main(int argc,char **argv)
{
    mat_t *matfp;
    matfp = Mat_Open(argv[1],MAT_ACC_RDONLY);
    if ( NULL == matfp ) {
        fprintf(stderr,"Error opening MAT file %s,argv[1]);
        return EXIT_FAILURE;
    }
    Mat_Close(matfp);
    return EXIT_SUCCESS;
}