Matlab coder error : This expression has size [:? x 1] ?
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi While using matlab coder codegen. I am getting following error.
Why output of find command is uncertain?
댓글 수: 1
답변 (2개)
Walter Roberson
2018년 10월 28일
편집: Walter Roberson
2018년 10월 28일
dpb is correct that zoomMax could be empty.
Even if it is not empty, J(1:zoomMax) would be variable length, leading positionX to be variable length, along with a number of other expressions on the following lines, right through to halfpx being variable length.
All of those variables need to be either noted with coder.varsize() or else need to be pre-initialized such as
N = numel(zoom);
positionX = zeros(1, N);
because it is legal with codegen to make an array shorter (by assigning something smaller to it) but not to have it be variable sized without configuring it specially.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!