bwlabel with Matlab coder
조회 수: 2 (최근 30일)
이전 댓글 표시
I am trying to convert matlab code to C++ using Matlab Coder. The memory is set not to use dynamic allocation. It fails to convert the function bwlabel , stating the function has some unbounded variables inside, and cannot be converted with static allocation.
Does bwlabel demand dynamic memory allocation, or I could have some other bug in my code?
댓글 수: 0
답변 (1개)
Sainath Varikuti
2015년 5월 1일
When generating code for 'bwlabel', the parameter 'n' must be compile time constant as discussed here. Try specifying the upper bound using 'code.varsize' or 'assert' statement in the MATLAB code.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!