Borrar filtros
Borrar filtros

How to get return of list of mwArray?

1 visualización (últimos 30 días)
Abhay Prakash
Abhay Prakash el 28 de Feb. de 2016
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)

Respuestas (0)

Categorías

Más información sobre Deploy to C++ Applications Using mwArray API (C++03) en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by