Stateflow Runtime Error (chart): Matrix(matrix) subscript turned out to be a vector(vector) subscript with shape different from compiled assumption.
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Ryan Livingston
il 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 Commenti
Vedere anche
Categorie
Scopri di più su Simulink Functions in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!