Variable Size Array bounds when compiling Simulink Model not working
Show older comments
Hello guys,
I got the following problem: I am currently trying to compile a Simulink Model using Blocks from the Robotic System Toolbox to C++. The compiler struggles when using variable size arrays in embedded matlab blocks.
The function is very simple and looks like the following:
function TWaypoints = ellipse (numWaypoints)
coder.varsize('TWaypoints', [3 30]);
TWaypoints = zeros(3,numWaypoints);
end
Even I defined the bounds of the array, I still receive the error message:
Computed maximum size is not bounded. Static memory allocation requires all sizes to be bounded. The computed size is [3 x :?]. More information
Function 'ellipse calculation ' (#86.189.210), line 13, column 14: "zeros(3,numWaypoints)" Launch diagnostic report.
I dont't really know what I am missing and couldn't find anything helpful in similar questions about compiling Simulink models with variable-size arrays, so your help would be greatly appreciated :)
Accepted Answer
More Answers (0)
Categories
Find more on Model Verification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!