Mex: Using arguments for definition an array
Mostra commenti meno recenti
Hello my friends :-)
I want to use the arguments from matlab in my mex/c-code and use them to define an array. Unfortunately an error appears. Can someone pls give a an advise for this problem? Many thanks for your help!
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
int sizeA;
mxArray *arg;
arg= prhs[0];
sizeA = mxGetScalar(arg);
int dim[3] = {100,3, sizeA}; // define array
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!