How to get data from Matlab to visual studio?

3 Ansichten (letzte 30 Tage)
Chan KitHoe
Chan KitHoe am 17 Sep. 2017
I am using Matlab2016b and Visual Studio 2015. How can I get a data that is a matrix with 3 dimensions from Matlab and transfer it into visual studio for C++ processing using Matlab Engine API? I have seen examples of how data transfer is done from visual C++ to Matlab with the code
mxArray* /*Pointer2*/ = mxCreateDoubleMatrix(arraysize, /*Dimension of array*/, mxREAL);
memcpy((void*)mxGetPr(/*Pointer2*/), (void *)/*Name of Array*/, sizeof(/*e.g double,int8*/)*/*arraysize*/);
engPutVariable(Engine */*Pointer1*/,const char/*Alias Name(name of that array used on matlab)*/,const mxArray*/*Pointer2*/);
But how do I receive data from Matlab?

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by