---
name: "Mat_VarDelete"
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_VarDelete"
---

# Mat\_VarDelete(3)

Deletes a MAT variable from a file.

## NAME

**Mat\_VarDelete** – Deletes a MAT variable from a file.

## SYNOPSIS

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

*int*\

**Mat\_VarDelete**(*mat\_t \*matfp*, *const char \*name*);

## DESCRIPTION

The **Mat\_VarDelete**() function deletes the MAT variable *name* from the MAT file given by MAT file structure *matfp*.

## RETURN VALUES

The function returns 0 on success. Otherwise, an error value is returned.
