Matlab coder error : This expression has size [:? x 1] ?
11 次查看(过去 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!