Example MATLAB class wrapper for a C++ class

An example of how to safely encapsulate a C++ class in a MATLAB class, via a mex interface.

https://github.com/ojwoodford/mex_class_wrapper

Download
Download

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Cite As

Oliver Woodford (2026). Example MATLAB class wrapper for a C++ class (https://github.com/ojwoodford/mex_class_wrapper/releases/tag/v1.4.1), GitHub. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.4.1

See release notes for this release on GitHub: https://github.com/ojwoodford/mex_class_wrapper/releases/tag/v1.4.1

Download
1.4.0

Added a standard interface to avoid needing an interface class per mex wrapper. Also added an example script.

Download
1.3.0

Add #includes suggested by Richard Crozier (thanks) to fix compilation in Linux.

Download
1.2.0

2nd attempt to fix compilation under linux.

Download
1.1.0

Fix compile error in Linux - thanks to Andreas for highlighting the issue.

Download
1.0.0

Download
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.