Simulinkデータオブジェクトを使用し、Storage Classを「Const」に設定することで生成コードに const を付加することができます。
ページ下部の 関連ドキュメント よりサンプルモデルをダウンロードすることができます。
サンプルモデルでは、Lookup Tableブロックのパラメータをmpt.Parameterで定義しており、コード生成を行うとadd_const.cにconst修飾子付きでデータが定義されます。
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!