MATLAB 数据 API
MATLAB 数据 API 为在 MATLAB 外部运行的应用程序提供了一种方法,可通过独立于 MATLAB 的接口来处理 MATLAB 数据。此 API 使用现代 C++ 语义和设计模式,并通过使用 MATLAB 的写入时复制 (copy-on-write) 语义来尽可能地避免数据复制。
注意
MATLAB 数据 API 支持现代 C++ 功能,但与 C 矩阵 API 不兼容。您不能在 MEX 文件中将来自 MATLAB Data API 的函数与来自 C 矩阵 API 和 C MEX API 的函数混合使用。同样,您不能在独立应用程序中将 MATLAB 数据 API 函数与 用于 C 的 MATLAB 引擎 API 或 用于读取 MAT 文件数据的 MATLAB C API 中的函数混合使用。
主题
- Create Arrays with C++ MATLAB Data API
Create MATLAB array.
- Copy C++ MATLAB Data Arrays
The
matlab::data::Array
class supports both copy and move semantics. - Access C++ Data Array Container Elements
The C++ MATLAB Data API
CellArray
andStructArray
types are containers for other MATLAB Data Arrays. - C++ Cell Arrays
To create a cell array, use the
matlab::data::ArrayFactory
createCellArray
function. - Operate on C++ Arrays Using Visitor Pattern
The visitor design pattern is a useful technique for performing various operations on arrays.
- MATLAB Data API Exceptions
The MATLAB Data API defines specific exception classes for MATLAB.
- MATLAB Data API Types
The MATLAB Data API defines specific types for working with MATLAB.