필터 지우기
필터 지우기

How to get return of list of mwArray?

조회 수: 1 (최근 30일)
Abhay Prakash
Abhay Prakash 2016년 2월 28일
I have a class Batch which contains 4 members as following (in C++):
class Batch
{
public:
float MaxLen = -1;
float** Word;
float* Delete;
};
I have to call Matlab DLL which will return a list of these Batch, prepared as following:
function [Batches] = GetBatches(...)
for i = 1:N_batch
current_batch = Batch();
current_batch.MaxLen = f(...);
...
Batches{i} = current_batch;
end
end
How do I get the return value (list of batches) in this situation. I am aware that if i need to get a single batch, then I need to have sent an mwArray of Batch class as following:
const char* batchFieldNames[] = {"MaxLen","Word","Delete"};
mwArray TestBatchMW(1, 1, sizeof(batchFieldNames) / sizeof(batchFieldNames[0]), batchFieldNames);
GetTestBatch(1, TestBatchMW, TestMW)

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deploy to C++ Applications Using mwArray API (C++03)에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by