use mxGetData

 

ex 1.  char array pointer

in Matlab code (caller):

use data type int8 for the passed array AA

 

in MEX C code (callee):

char* AA = (char*) mxGetData(prhs[0]);  

 

 

ex 2.   float array pointer

 

in Matlab code (caller):

use data type single for the passed array AA

 

in MEX C code (callee):

float* AA = (float*) mxGetData(prhs[0]);  

文章標籤
全站熱搜
創作者介紹
創作者 bamil 的頭像
bamil

My Humble House

bamil 發表在 痞客邦 留言(0) 人氣(0)