Main Content

本页的翻译已过时。点击此处可查看最新英文版本。

MATLAB 数据 API

创建可用于 MATLAB® 数据的 C++ 程序

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 中的函数混合使用。

Factory

matlab::data::ArrayFactoryC++ class to create arrays

数组类型

matlab::data::Array所有数组类型的 C++ 基类
matlab::data::TypedArray<T>Templated C++ class to access array data
matlab::data::CellArrayC++ class to access MATLAB cell arrays
matlab::data::CharArrayC++ class to access MATLAB character arrays
matlab::data::EnumArrayC++ class to access MATLAB enumeration arrays
matlab::data::ObjectArrayC++ class to access MATLAB object arrays
matlab::data::SparseArray<T>Templated C++ class to access data in MATLAB sparse arrays
matlab::data::StringArrayC++ class to access MATLAB string arrays
matlab::data::StructArrayC++ class to access MATLAB struct arrays

数据类型

matlab::data::ArrayTypeC++ array type enumeration class
matlab::data::ArrayDimensionsType specifying array dimensions
matlab::data::EnumerationElement type for MATLAB enumeration arrays
matlab::data::MATLABFieldIdentifierC++ class used to identify field names in MATLAB struct array
matlab::data::MATLABStringElement type for MATLAB string arrays
matlab::data::ObjectMATLAB 对象数组的元素类型
matlab::data::optional<T>Templated C++ class representing optional values
matlab::data::StringType representing strings as std::basic_string<char16_t>
matlab::data::StructElement type for MATLAB struct arrays

引用

matlab::data::Reference<T>Templated C++ class to get references to Array elements
matlab::data::Reference<MATLABString>C++ class to get reference to element of StringArray
matlab::data::Reference<Struct>C++ class to get reference to element of StructArray
matlab::data::Reference<Array>C++ class to get reference to Array
matlab::data::Reference<TypedArray<T>>Templated C++ class to get reference to TypedArray
matlab::data::Reference<SparseArray<T>>Templated C++ class to get reference to SparseArray
matlab::data::Reference<CharArray>C++ class to get reference to CharArray
matlab::data::Reference<EnumArray>C++ class to get reference to EnumArray
matlab::data::Reference<StructArray>C++ class to get reference to StructArray

迭代器

matlab::data::TypedIterator<T>Templated C++ class to provide random access iterator in memory order
matlab::data::ForwardIterator<T>Templated C++ class to provide forward iterator support for StructArray field names
matlab::data::Range<ItType,ElemType>Templated C++ class to provide range-based operation support

辅助函数

matlab::data::apply_visitorCall Visitor class on arrays
matlab::data::apply_visitor_refCall Visitor class on array references

异常

matlab::ExceptionC++ base class for exceptions

主题