Stateflow Runtime Error (chart): Matrix(matrix) subscript turned out to be a vector(vector) subscript with shape different from compiled assumption.
1 次查看(过去 30 天)
显示 更早的评论
Hello, I have been trying to run a MATLAB function block in simulink with variable size input and output data. The compilation was successful but I get a run time error stating:
Stateflow Runtime Error (chart): Matrix(matrix) subscript turned out to be a vector(vector) subscript with shape different from compiled assumption. The error is present in the following line:
[crcDetCbData, crcCbFlags(cbIdx),iters(cbIdx)] = step(turboobject, in, intrlvIndices);
where turboobject is an instance of commLTETurboDecoder, in -input data intrlvindices is the indices for interleaving.
the function file runs without any error in MATLAB. But when I implement the same in Simulink I get the above error.
I am using this model for my project. It would be very helpful if anyone can provide a solution the earliest.
0 个评论
回答(1 个)
Ryan Livingston
2015-3-15
The issue is described in detail, with workarounds, in the documentation:
In short, when indexing with non-scalars, the output generally has the size of the index, unless the array being indexed is a vector. To generate more efficient code with variable-sized arrays, the requirements are made more strict for code generation.
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!