MATLAB: How to enable support for variable-size data in Simulink 7.7 (R2011a)

simulink

When I implement embedded MATLAB code in my Simulink model, I get the following error message:
The coder.varsize() built-in function can only be used when support for dynamic matrix is turned on
I would like to know how I can enable the ability to support dynamic matrices.

Best Answer

The support for dynamic matrices could be enabled by checking the option"Support Variable-Size Arrays" in Model Explorer.
Please refer to the section "Enabling Support for Variable-Size Data" in the following location: