-1

I read the second variable in C++

#define D prhs[1]

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

Now I want to get the size of D

int mySize = mxGetM(D);

cool...Now how can I get the size from the pointer d (not D)?

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

Thanks

user657267
  • 20,568
  • 5
  • 58
  • 77
mask
  • 539
  • 1
  • 5
  • 18

1 Answers1

-1

I guess it's not possible to find the size of an array given its pointer and mex.h also cannot do that.

mask
  • 539
  • 1
  • 5
  • 18