Does the Shift Arithmetic block support tunable expressions for code generation in Real-Time Workshop 7.1 (R2008a)?
古いコメントを表示
I have a Shift Arithmetic block in my model whose "Number of bits to shift right" parameter is set to a variable "Shift" which is defined as follows:
Shift = mpt.Parameter;
Shift.RTWInfo.StorageClass = 'ExportedGlobal';
Shift.Value = 2;
In the generated code, the arithmetic shift statement contains a constant rather than a variable. For example, the statement appears as follows:
out = in >> 2;
Setting the Storage class of the parameter to 'ImportedExtern' or using Custom Storage classes did not help.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Simulink Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!