2015-08-24 12 views
-1

獲取矩陣大小我讀了C++的第二個變量從指針 - MEX

#define D prhs[1] 

double* d = mxGetPr(D); // get the pointer 

現在我想要得到的D

int mySize = mxGetM(D); 

很酷...現在,我怎麼得到大小指針的大小爲d(而不是D)?

int mySize = mxGetM((const mxArray) d); // does not work 

感謝

回答

-1

我想這是不可能找到賦予其指針和mex.h還不能做到這一點的數組的大小。

+0

這是如何回答你自己的問題?你知道這是不可能的嗎? – Schorsch