How to get return of list of mwArray?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File 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!