---
name: "Mat_VarGetSize"
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_VarGetSize"
---

# Mat\_VarGetSize(3)

Calculates the size of a MAT variable in bytes.

## NAME

**Mat\_VarGetSize** – Calculates the size of a MAT variable in bytes.

## SYNOPSIS

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

*size\_t*\

**Mat\_VarGetSize**(*const matvar\_t \*matvar*);

## DESCRIPTION

The **Mat\_VarGetSize**() function calculates the size of a MAT variable *matvar* in bytes similar to the MATLAB whos command.

## RETURN VALUES

The function returns the number of bytes.
