---
name: "Mat_GetFilename"
section: "3"
platform: "linux"
package: "libmatio"
version: "1.5.30-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Mat_GetFilename"
---

# Mat\_GetFilename(3)

Returns the filename of a MATLAB MAT file given a MAT file structure.

## NAME

**Mat\_GetFilename** – Returns the filename of a MATLAB MAT file given a MAT file structure.

## SYNOPSIS

**#include \<matio.h\>**

*const* *char* *\**\

**Mat\_GetFilename**(*const mat\_t \*matfp*);

## DESCRIPTION

The **Mat\_GetFilename**() function returns the filename of the MATLAB MAT file given by the MAT file structure.

## RETURN VALUES

The function returns the read-only filename of the opened MATLAB MAT file.

## SEE ALSO

[Mat\_CreateVer(3)](/Mat_CreateVer/3.md), [Mat\_Open(3)](/Mat_Open/3.md), [Mat\_GetFileAccessMode(3)](/Mat_GetFileAccessMode/3.md), [Mat\_GetHeader(3)](/Mat_GetHeader/3.md), [Mat\_GetVersion(3)](/Mat_GetVersion/3.md)
