Why do I get a size mismatch error during code generation but not during regular MATLAB execution?
显示 更早的评论
I have the following MATLAB function:
function example()
x = [1 2 3];
y = [1 2 3; 4 5 6; 7 8 9];
z = x+y;
When I run it by executing the following in MATLAB Command Window:
example()
I receive no error.
But, if I perform code generation either using the MATLAB Coder app or "codegen", I received the following error: ERROR: Size mismatch (size [1 x 3] ~= size [3 x 3])
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!