Clear Filters
Clear Filters

Limit in MEX-files

3 views (last 30 days)
rohit
rohit on 22 Jan 2020
Commented: Guillaume on 22 Jan 2020
Hi,
I'm new to Matlab mex. I'm trying to write a mex function which in turn will take the structure data from a .cpp file and use it in matlab.
I came to know that plhs and prhs are the pointers to an array which hold the output data and input data respectively, each element of type mxArray.
Since structure size can be large, Is there any maximum size limit for the plhs and prhs array to hold the data ? If so, What are the alternate ways?

Accepted Answer

Walter Roberson
Walter Roberson on 22 Jan 2020
The maximum size limit is 2^48-1 elements per variable and 2^48-1 variables for input or output.
  1 Comment
Guillaume
Guillaume on 22 Jan 2020
Needless to say, you will probably run out of memory before you hit these limits.

Sign in to comment.

More Answers (0)

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Products


Release

R2015b

Community Treasure Hunt

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

Start Hunting!