I have the following functioning code (not my own) that I am attempting to put through C++ code generation.
exampleData = double(dataRight(:,2)) < (pointsRight(1,2) + objLength + 0.101);
The right side of the expression fails, however, citing a size mismatch between the left and right side of the less than sign.
Size mismatch (size [:? x 1] ~= size [0 x 0]).
However, matlab's website says that mismatch sizes are, in this case, the typical use case. Further, no specific exceptions or oddities are noted for Matlab Coder, so I'm a bit lost why I'm getting this error.
pointsRight? have you actually tried this? as far as i know, mismatch size error is when you want to access non-existing row-column..test = (pointsRight(1,2) + objLength + 0.101)runs fine. It is specifically the introduction of<that causes the error.(pointsRight(1,2) + objLength + 0.101)scalar (only had a single element), whiledouble(dataRight(:,2))could have more than a single element (multiple rows)..A = [5,4,3]; B= A > 4works, outside of coder. It yields [1,0,0].