apache/arrow
MATLAB
Active contributors: Kevin Gurney, Sarah Gilmore (community)
The matlab/ directory contains MATLAB classes that wrap the Arrow C++ library through MEX shims. It is the smallest of the language implementations in this repo but enables MATLAB users to read Parquet and Feather files into MATLAB tables, build Arrow record batches, and exchange data with Python via Arrow's IPC format.
Purpose
Make Arrow first-class in MATLAB. This unlocks Parquet read/write directly from MATLAB without round-tripping through Python or CSV.
Layout
matlab/
├── CMakeLists.txt # CMake build (depends on libarrow)
├── README.md
├── doc/ # MATLAB live scripts and Markdown docs
├── src/ # MEX C++ source
└── test/ # MATLAB unit tests
└── tools/ # Build helpersThe C++ code in matlab/src/ is split into:
- MEX shims — small C++ files compiled as MATLAB MEX functions. Each MEX file accepts MATLAB call args, converts them to C++ types, calls into libarrow, and converts the return value back to MATLAB.
- Proxy classes — C++ helpers that wrap Arrow C++ objects so the MEX layer can hold them across calls.
- MATLAB packages under
+arrow/that exposearrow.array.Int32Array,arrow.tabular.RecordBatch, etc., to user code.
API
A typical user session:
% Read a Parquet file
t = arrow.io.parquet.read("data.parquet");
% Inspect schema
disp(t.Schema);
% Build a record batch from MATLAB data
arr = arrow.array(int32([1 2 3]));
batch = arrow.tabular.RecordBatch.fromArrays(arr, Names="x");
% Write Feather file
arrow.io.feather.write(batch, "out.feather");The MATLAB API is a subset of the full C++ API — focused on the file formats and basic array operations that are most useful for MATLAB users. Compute kernels and Acero are not exposed (yet).
Build
cmake -S . -B build
cmake --build buildThe build links against an existing libarrow.so. CI runs the MATLAB tests via .github/workflows/matlab.yml using GitHub-hosted MATLAB runners.
Testing
Tests use the MATLAB unit test framework. runArrowMatlabTests.m is the entry point. Tests are organized by class under test/arrow/ mirroring src/'s package layout.
Status and roadmap
The MATLAB bindings are the youngest of the implementations in this repo. Active work focuses on:
- Expanding type coverage (decimal, list, struct).
- Adding Acero compute support.
- Improving the Parquet API surface.
Contributions are tracked under the [MATLAB] GitHub issue label.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.