It's more a question about how C/C++ Coder works internally:
I'm checking the option "Enable variable-sizing" and setting the "Dynamic Memory allocation" option to "For all variable-sized arrays". With this, I'm telling coder: "Hey the size of the variables can change indefinitely and you should use dynamic memory allocation", right?
So, why do I still need to put directives like "coder.varsize('my_var',[Inf Inf], [1 1])" in the Matlab code to get past errors like "Dimension n is fixed on one side but varies on the other side" if I already configured the Coder to use dynamic allocation? Shouldn't it be able to figure out the sizing of variables at this point?
Thank you so much!
Best Answer