RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

RunMat™ is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

LicensePrivacy
/
See all docs
Builtin Reference
    • load
    • matfile
    • save

matfile — Create a MAT-file object for whole-variable reads and writes.

matfile(filename) returns a matlab.io.MatFile compatibility object. RunMat supports m.Properties, whole-variable dot reads such as m.A, and whole-variable dot assignment when the object is constructed with 'Writable', true.

Syntax

matfile(filename)

Options

  • Writable accepts a scalar logical or numeric value. When false or omitted, dot assignment through the object is rejected.
  • m.Properties returns a struct containing Source and Writable.
  • Dot reads load a complete variable from the MAT-file, preserving the existing load builtin's Level-5 MAT-file type support.

GPU memory and residency

matfile is host file I/O. GPU-resident assignment values are gathered before MAT-file serialization.

Examples

Read a whole variable

m = matfile('data.mat');
A = m.A;

Expected output:

A contains the variable loaded from data.mat.

Write whole variables

m = matfile('data.mat', 'Writable', true);
m.A = rand(3);
m.flag = true;

Expected output:

The MAT-file is rewritten with updated whole variables.

Using matfile with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how matfile changes the result.

Run a small matfile example, explain the result, then change one input and compare the output.

Related Io functions

Mat

load · save

Net

accept · read · readline · tcpclient · tcpserver · write

Repl Fs

addpath · cd · copyfile · delete · dir · exist · fileattrib · fileparts · fullfile · genpath · getenv · getpref · isenv · isfile · isfolder · ispref · ls · matlabroot · memmapfile · mkdir · movefile · open · opentoline · path · pathsep · pcode · pwd · readstruct · rehash · restoredefaultpath · rmdir · rmpath · run · savepath · setenv · setpref · system · tempdir · tempname · uigetdir · uigetfile · uiputfile · unsetenv · userpath · what · winqueryreg · xmlread · xmlwrite

Tabular

arrayDatastore · csvread · csvwrite · detectImportOptions · dlmread · dlmwrite · fileDatastore · parquetDatastore · parquetinfo · parquetread · readcell · readmatrix · readtable · readtimetable · spreadsheetImportOptions · writecell · writematrix · writetable · writetimetable · xlsread · xlswrite

Audio

audioinfo · audioread

Io

clc · diary · disp · display · format · input

Filetext

fclose · feof · fgetl · fgets · fileread · filewrite · fopen · fprintf · fread · frewind · fwrite · readlines · writelines

Archive

gunzip · gzip · unzip

Hdf5

h5disp · h5info · h5read · h5write · h5writeatt · hdf5info · hdf5read · hdf5write

Import

importdata · textscan

Json

jsondecode · jsonencode

Http

sendmail · urldecode · urlencode · weboptions · webread · websave · webwrite

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Options
  • GPU memory and residency
  • Examples
  • Read a whole variable
  • Write whole variables
  • Using matfile with coding agents
  • Related Io functions
  • Mat
  • Net
  • Repl Fs
  • Tabular
  • Audio
  • Io
  • Filetext
  • Archive
  • Hdf5
  • Import
  • Json
  • Http
  • About RunMat