Matlab Coder : Matlab Array to C Array -


i used matlab coder convert matlab code c. simple array had defined in matlab got converted complicated struct in c.

struct emxarray_real_t {   double *data;   int *size;   int allocatedsize;   int numdimensions;   boolean_t canfreedata; }; 

it of great if can shed light on how work struct.

the type emxarray_real_t created because matlab coder unable determine fixed size or sufficiently small bounds on size array in matlab, 2x3. in case generated code allows size of array vary @ runtime using dynamic memory allocation (e.g. malloc) , data structure represent matlab array in c. these called dynamically allocated variable size arrays in matlab coder documentation , struct fields used track dynamically allocated memory in generated code.

regarding working such arrays, documentation recommended @horchler place start. also, can have @ other answer describes basics of working same struct when stored data uint32 rather double or real_t in case.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -