필터 지우기
필터 지우기

bwlabel with Matlab coder

조회 수: 1 (최근 30일)
Alex Zlotnik
Alex Zlotnik 2015년 4월 30일
답변: Sainath Varikuti 2015년 5월 1일
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?

답변 (1개)

Sainath Varikuti
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.

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by