Установите поле матрицы в структуру MatlabC++

Программы на C++. Форум разработчиков
Anonymous
Установите поле матрицы в структуру Matlab

Сообщение Anonymous »


Я связываю код Matlab с интеграцией кода C++.

Код: Выделить всё

engine.h
.

I create a struct with several scalar and matrix fields. I create first the scalar fields using command line syntax, i wrote the helper method

Код: Выделить всё

void matlabSetStruct(Engine * ep, const std::string structure,
const std::string field, T value)
{
ostringstream ss;
ss  matrix fields are independent variables

I found [code]mxSetField
, however this is for adding a field to a struct created with

Код: Выделить всё

mxCreateStructMatrix
and this method is for creating Matlab equivalent of a matrix of struct in C, not quite what I want to achieve.


Источник: https://stackoverflow.com/questions/268 ... lab-struct

Вернуться в «C++»