Stateflow Runtime Error (chart): Matrix(matrix) subscript turned out to be a vector(vector) subscript with shape different from compiled assumption.
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Ryan Livingston
on 15 Mar 2015
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 Comments
See Also
Categories
Find more on Simulink Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!